another tool selection fix

This commit is contained in:
Leijurv 2019-06-05 12:04:09 -07:00
parent 1e43563cc3
commit a1c03eb601
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
1 changed files with 1 additions and 0 deletions

View File

@ -114,6 +114,7 @@ public abstract class Movement implements IMovement, MovementHelper {
currentState.setInput(Input.JUMP, true);
}
if (ctx.player().isEntityInsideOpaqueBlock()) {
ctx.getSelectedBlock().ifPresent(pos -> MovementHelper.switchToBestToolFor(ctx, BlockStateInterface.get(ctx, pos)));
currentState.setInput(Input.CLICK_LEFT, true);
}