Rename water bucket stack constant
This commit is contained in:
parent
8de0d0ccd3
commit
1ede48a5e4
@ -32,7 +32,7 @@ import net.minecraft.util.math.Vec3d;
|
|||||||
|
|
||||||
public class MovementFall extends Movement {
|
public class MovementFall extends Movement {
|
||||||
|
|
||||||
private static final ItemStack WATER_BUCKET_STACK = new ItemStack(Items.WATER_BUCKET);
|
private static final ItemStack STACK_WATER_BUCKET = new ItemStack(Items.WATER_BUCKET);
|
||||||
|
|
||||||
public MovementFall(BlockPos src, BlockPos dest) {
|
public MovementFall(BlockPos src, BlockPos dest) {
|
||||||
super(src, dest, MovementFall.buildPositionsToBreak(src, dest), new BlockPos[] { dest.down() });
|
super(src, dest, MovementFall.buildPositionsToBreak(src, dest), new BlockPos[] { dest.down() });
|
||||||
@ -68,11 +68,11 @@ public class MovementFall extends Movement {
|
|||||||
case RUNNING:
|
case RUNNING:
|
||||||
BlockPos playerFeet = playerFeet();
|
BlockPos playerFeet = playerFeet();
|
||||||
if (!BlockStateInterface.isWater(dest) && src.getY() - dest.getY() > 3) {
|
if (!BlockStateInterface.isWater(dest) && src.getY() - dest.getY() > 3) {
|
||||||
if (!player().inventory.hasItemStack(WATER_BUCKET_STACK) || world().provider.isNether()) {
|
if (!player().inventory.hasItemStack(STACK_WATER_BUCKET) || world().provider.isNether()) {
|
||||||
state.setStatus(MovementStatus.UNREACHABLE);
|
state.setStatus(MovementStatus.UNREACHABLE);
|
||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
player().inventory.currentItem = player().inventory.getSlotFor(WATER_BUCKET_STACK);
|
player().inventory.currentItem = player().inventory.getSlotFor(STACK_WATER_BUCKET);
|
||||||
LookBehaviorUtils.reachable(dest).ifPresent(rotation ->
|
LookBehaviorUtils.reachable(dest).ifPresent(rotation ->
|
||||||
state.setInput(InputOverrideHandler.Input.CLICK_RIGHT, true)
|
state.setInput(InputOverrideHandler.Input.CLICK_RIGHT, true)
|
||||||
.setTarget(new MovementTarget(rotation))
|
.setTarget(new MovementTarget(rotation))
|
||||||
|
Loading…
Reference in New Issue
Block a user