another tool selection fix

This commit is contained in:
Leijurv
2019-06-05 12:04:09 -07:00
parent 1e43563cc3
commit a1c03eb601

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);
}