todo
This commit is contained in:
parent
0ba018388a
commit
e131734657
@ -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() {
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user