Skip to content

Commit

Permalink
Make Vambraces of Steady Progression not push the player up/down when…
Browse files Browse the repository at this point in the history
… the player is flying (#51)

* Vambraces of Steady Progression don't push down flying players

* Update ItemMagicalBaubles.java

* Apply spotless, fix using C++ style cast instead of Java, and move logic inside the Vambrace-specific block

(cherry picked from commit 03010c2)
  • Loading branch information
norbby42 authored and Dream-Master committed May 19, 2024
1 parent c588bae commit 6c10469
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,11 @@ public void onItemTicked(EntityLivingBase living, ItemStack stack) {
}

if (stack.getItemDamage() == 3 && living.isOnLadder()) {
if (living.isCollidedHorizontally) living.moveEntity(0, .25, 0);
else if (!living.isSneaking()) living.moveEntity(0, -.1875, 0);
final boolean 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 6c10469

Please sign in to comment.