Skip to content

Commit

Permalink
Update ItemMagicalBaubles.java
Browse files Browse the repository at this point in the history
  • Loading branch information
norbby42 authored May 13, 2024
1 parent 357bae7 commit 32d6297
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,13 @@ public void onItemTicked(EntityLivingBase living, ItemStack stack) {
onItemEquipped(living, stack);
}

EntityPlayer player = (EntityPlayer)living;
final bool isFlying = player && player.capabilities.isFlying;

if (stack.getItemDamage() == 3 && living.isOnLadder() && !isFlying) {
if (living.isCollidedHorizontally) living.moveEntity(0, .25, 0);
else if (!living.isSneaking()) living.moveEntity(0, -.1875, 0);
if (stack.getItemDamage() == 3 && living.isOnLadder()) {
final bool isFlying = living instanceof EntityPlayer && (EntityPlayer)living.capabilities.isFlying;
if (!isFlying)
{
if (living.isCollidedHorizontally) living.moveEntity(0, .25, 0);
else if (!living.isSneaking()) living.moveEntity(0, -.1875, 0);
}
}
}

Expand Down

0 comments on commit 32d6297

Please sign in to comment.