mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Disguise ability will no longer require mana in creative mode
This commit is contained in:
parent
0ddd43c39a
commit
d3993e987d
1 changed files with 5 additions and 3 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue