automatically break block while suffocating, fixes #33

This commit is contained in:
Leijurv 2018-10-10 21:25:21 -07:00
parent 9bd205f190
commit fec29d03fd
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 4 additions and 1 deletions

View File

@ -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 ->