Skip to content

Commit

Permalink
Merge pull request #24 from GTNewHorizons/unidirectionalBoots
Browse files Browse the repository at this point in the history
Make boots apply speed boost to all directions
  • Loading branch information
Dream-Master authored Feb 18, 2024
2 parents ef20e3c + 50164a4 commit b39a60b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/thaumicboots/api/ItemBoots.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
player.fallDistance = 0.0F;
}

if (player.moveForward <= 0F) {
if (player.moveForward == 0F && player.moveStrafing == 0F) {
return;
}

Expand Down Expand Up @@ -227,7 +227,12 @@ public void applyBonus(EntityPlayer player, float bonus) {
bonus *= 0.25F;
}
if (player.onGround || player.isOnLadder() || player.capabilities.isFlying) {
player.moveFlying(0.0F, 1.0F, bonus);
if (player.moveForward != 0.0) {
player.moveFlying(0.0F, player.moveForward, bonus);
}
if (player.moveStrafing != 0.0) {
player.moveFlying(player.moveStrafing, 0.0F, bonus);
}
} else if (Hover.getHover(player.getEntityId())) {
player.jumpMovementFactor = 0.03F;
} else {
Expand Down

0 comments on commit b39a60b

Please sign in to comment.