This commit is contained in:
Leijurv 2018-08-08 15:59:29 -07:00
parent 0ba018388a
commit e131734657
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 3 additions and 3 deletions

View File

@ -37,7 +37,7 @@ public class CalculationContext implements Helper {
public CalculationContext(ToolSet toolSet) { public CalculationContext(ToolSet toolSet) {
this.toolSet = toolSet; this.toolSet = toolSet;
this.hasWaterBucket = player().inventory.hasItemStack(new ItemStack(Items.WATER_BUCKET)); this.hasWaterBucket = player().inventory.hasItemStack(new ItemStack(Items.WATER_BUCKET)); // TODO check if water bucket is on hotbar or main inventory
} }
public ToolSet getToolSet() { public ToolSet getToolSet() {

View File

@ -72,7 +72,7 @@ public class MovementFall extends Movement {
BlockPos playerFeet = playerFeet(); BlockPos playerFeet = playerFeet();
Optional<Rotation> targetRotation = Optional.empty(); Optional<Rotation> targetRotation = Optional.empty();
if (!BlockStateInterface.isWater(dest) && src.getY() - dest.getY() > 3 && !playerFeet.equals(dest)) { if (!BlockStateInterface.isWater(dest) && src.getY() - dest.getY() > 3 && !playerFeet.equals(dest)) {
if (!player().inventory.hasItemStack(STACK_BUCKET_WATER) || world().provider.isNether()) { if (!player().inventory.hasItemStack(STACK_BUCKET_WATER) || world().provider.isNether()) { // TODO check if water bucket is on hotbar or main inventory
state.setStatus(MovementStatus.UNREACHABLE); state.setStatus(MovementStatus.UNREACHABLE);
return state; return state;
} else if (playerFeet().getY() - dest.getY() < mc.playerController.getBlockReachDistance()) { } else if (playerFeet().getY() - dest.getY() < mc.playerController.getBlockReachDistance()) {
@ -80,7 +80,7 @@ public class MovementFall extends Movement {
targetRotation = LookBehaviorUtils.reachable(dest.down()); targetRotation = LookBehaviorUtils.reachable(dest.down());
} }
} }
if(targetRotation.isPresent()) if (targetRotation.isPresent())
state.setInput(InputOverrideHandler.Input.CLICK_RIGHT, true) state.setInput(InputOverrideHandler.Input.CLICK_RIGHT, true)
.setTarget(new MovementTarget(targetRotation.get())); .setTarget(new MovementTarget(targetRotation.get()));
else else