Skip to content

Commit

Permalink
Fix Cirrus/Nimbus Amulet miscounting jumps
Browse files Browse the repository at this point in the history
(fixes #3939)
  • Loading branch information
TheRealWormbo committed Apr 2, 2024
1 parent 12a6303 commit c4d5b26
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ public void onWornTick(ItemStack stack, LivingEntity living) {
if (playerSp.onGround()) {
timesJumped = 0;
} else {
if (timesJumped == 0) {
// regardless how ground contact was lost, count that as first jump
timesJumped = 1;
jumpDown = true;
}
if (playerSp.input.jumping) {
if (!jumpDown && timesJumped < ((CirrusAmuletItem) stack.getItem()).getMaxAllowedJumps()) {
playerSp.jumpFromGround();
Expand Down

0 comments on commit c4d5b26

Please sign in to comment.