The Agility Cape's step height ability turns off if the player is sneaking.

This commit is contained in:
bconlon 2020-07-21 19:33:00 -07:00
parent 1a07c4ec9a
commit 8cb2232c55

View file

@ -62,6 +62,8 @@ public class AbilityAccessories implements IAetherAbility {
}
if (this.player.getAccessoryInventory().wearingAccessory(new ItemStack(ItemsAether.agility_cape))) {
if (!this.player.getEntity().isSneaking())
{
this.player.getEntity().stepHeight = 1.0F;
this.stepUpdate = true;
} else {
@ -70,6 +72,12 @@ public class AbilityAccessories implements IAetherAbility {
this.stepUpdate = false;
}
}
} else {
if (this.stepUpdate) {
this.player.getEntity().stepHeight = 0.5F;
this.stepUpdate = false;
}
}
if (this.player.getAccessoryInventory().wearingAccessory(new ItemStack(ItemsAether.invisibility_cape))) {
this.player.getEntity().setInvisible(true);