mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-30 16:28:00 +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
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Hit tryActivate(Pony player) {
|
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 Hit.INSTANCE;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -35,7 +35,7 @@ public class ChangelingDisguiseAbility extends ChangelingFeedAbility {
|
||||||
public void apply(Pony iplayer, Hit data) {
|
public void apply(Pony iplayer, Hit data) {
|
||||||
PlayerEntity player = iplayer.getMaster();
|
PlayerEntity player = iplayer.getMaster();
|
||||||
|
|
||||||
if (iplayer.getMagicalReserves().getMana().getPercentFill() < 0.9F) {
|
if (!player.isCreative() && iplayer.getMagicalReserves().getMana().getPercentFill() < 0.9F) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,7 +63,9 @@ public class ChangelingDisguiseAbility extends ChangelingFeedAbility {
|
||||||
return disc;
|
return disc;
|
||||||
}).setDisguise(looked);
|
}).setDisguise(looked);
|
||||||
|
|
||||||
iplayer.getMagicalReserves().getMana().multiply(0.1F);
|
if (!player.isCreative()) {
|
||||||
|
iplayer.getMagicalReserves().getMana().multiply(0.1F);
|
||||||
|
}
|
||||||
|
|
||||||
player.calculateDimensions();
|
player.calculateDimensions();
|
||||||
iplayer.setDirty();
|
iplayer.setDirty();
|
||||||
|
|
Loading…
Reference in a new issue