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,8 +62,16 @@ public class AbilityAccessories implements IAetherAbility {
}
if (this.player.getAccessoryInventory().wearingAccessory(new ItemStack(ItemsAether.agility_cape))) {
this.player.getEntity().stepHeight = 1.0F;
this.stepUpdate = true;
if (!this.player.getEntity().isSneaking())
{
this.player.getEntity().stepHeight = 1.0F;
this.stepUpdate = true;
} else {
if (this.stepUpdate) {
this.player.getEntity().stepHeight = 0.5F;
this.stepUpdate = false;
}
}
} else {
if (this.stepUpdate) {
this.player.getEntity().stepHeight = 0.5F;