automatically break block while suffocating, fixes #33
This commit is contained in:
parent
9bd205f190
commit
fec29d03fd
@ -116,6 +116,9 @@ public abstract class Movement implements IMovement, Helper, MovementHelper {
|
|||||||
if (BlockStateInterface.isLiquid(playerFeet())) {
|
if (BlockStateInterface.isLiquid(playerFeet())) {
|
||||||
latestState.setInput(Input.JUMP, true);
|
latestState.setInput(Input.JUMP, true);
|
||||||
}
|
}
|
||||||
|
if (player().isEntityInsideOpaqueBlock()) {
|
||||||
|
latestState.setInput(Input.CLICK_LEFT, true);
|
||||||
|
}
|
||||||
|
|
||||||
// If the movement target has to force the new rotations, or we aren't using silent move, then force the rotations
|
// If the movement target has to force the new rotations, or we aren't using silent move, then force the rotations
|
||||||
latestState.getTarget().getRotation().ifPresent(rotation ->
|
latestState.getTarget().getRotation().ifPresent(rotation ->
|
||||||
|
@ -209,7 +209,7 @@ public class MovementPillar extends Movement {
|
|||||||
// If it's been more than forty ticks of trying to jump and we aren't done yet, go forward, maybe we are stuck
|
// If it's been more than forty ticks of trying to jump and we aren't done yet, go forward, maybe we are stuck
|
||||||
state.setInput(InputOverrideHandler.Input.MOVE_FORWARD, true);
|
state.setInput(InputOverrideHandler.Input.MOVE_FORWARD, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!blockIsThere) {
|
if (!blockIsThere) {
|
||||||
Block fr = BlockStateInterface.get(src).getBlock();
|
Block fr = BlockStateInterface.get(src).getBlock();
|
||||||
|
Loading…
Reference in New Issue
Block a user