From d3993e987de2824962879a77e06b8125735326e5 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 10 Oct 2020 19:12:40 +0200 Subject: [PATCH] Disguise ability will no longer require mana in creative mode --- .../unicopia/ability/ChangelingDisguiseAbility.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/ability/ChangelingDisguiseAbility.java b/src/main/java/com/minelittlepony/unicopia/ability/ChangelingDisguiseAbility.java index 8b8f0016..7a0e7a69 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/ChangelingDisguiseAbility.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/ChangelingDisguiseAbility.java @@ -25,7 +25,7 @@ public class ChangelingDisguiseAbility extends ChangelingFeedAbility { @Nullable @Override public Hit tryActivate(Pony player) { - if (player.getMagicalReserves().getMana().getPercentFill() >= 0.9F) { + if (player.getMaster().isCreative() || player.getMagicalReserves().getMana().getPercentFill() >= 0.9F) { return Hit.INSTANCE; } return null; @@ -35,7 +35,7 @@ public class ChangelingDisguiseAbility extends ChangelingFeedAbility { public void apply(Pony iplayer, Hit data) { PlayerEntity player = iplayer.getMaster(); - if (iplayer.getMagicalReserves().getMana().getPercentFill() < 0.9F) { + if (!player.isCreative() && iplayer.getMagicalReserves().getMana().getPercentFill() < 0.9F) { return; } @@ -63,7 +63,9 @@ public class ChangelingDisguiseAbility extends ChangelingFeedAbility { return disc; }).setDisguise(looked); - iplayer.getMagicalReserves().getMana().multiply(0.1F); + if (!player.isCreative()) { + iplayer.getMagicalReserves().getMana().multiply(0.1F); + } player.calculateDimensions(); iplayer.setDirty();