even if holding a bucket, landing in water means done

This commit is contained in:
Leijurv 2018-08-08 15:27:14 -07:00
parent 04571426fe
commit b1462d5649
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -36,7 +36,7 @@ public class MovementFall extends Movement {
private static final ItemStack STACK_BUCKET_AIR = new ItemStack(Items.BUCKET);
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()});
}
@Override
@ -83,7 +83,7 @@ public class MovementFall extends Movement {
state.setTarget(new MovementTarget(rotationToBlock));
}
if (playerFeet.equals(dest) && (player().posY - playerFeet.getY() < 0.01
|| (BlockStateInterface.isWater(dest) && !player().inventory.hasItemStack(STACK_BUCKET_AIR)))) {
|| (BlockStateInterface.isWater(dest)))) {
if (BlockStateInterface.isWater(dest) && player().inventory.hasItemStack(STACK_BUCKET_AIR)) {
return state.setInput(InputOverrideHandler.Input.CLICK_RIGHT, true);
}