clear blocks in the way, probably fixes #82

This commit is contained in:
Leijurv 2018-08-23 09:41:17 -07:00
parent f9189d7ec3
commit bde507cac6
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -196,10 +196,12 @@ public class MovementTraverse extends Movement {
if (Objects.equals(LookBehaviorUtils.getSelectedBlock().orElse(null), against1) && Minecraft.getMinecraft().player.isSneaking()) { if (Objects.equals(LookBehaviorUtils.getSelectedBlock().orElse(null), against1) && Minecraft.getMinecraft().player.isSneaking()) {
if (LookBehaviorUtils.getSelectedBlock().get().offset(side).equals(positionsToPlace[0])) { if (LookBehaviorUtils.getSelectedBlock().get().offset(side).equals(positionsToPlace[0])) {
state.setInput(InputOverrideHandler.Input.CLICK_RIGHT, true); state.setInput(InputOverrideHandler.Input.CLICK_RIGHT, true);
return state;
} else { } else {
// Out.gui("Wrong. " + side + " " + LookBehaviorUtils.getSelectedBlock().get().offset(side) + " " + positionsToPlace[0], Out.Mode.Debug); // Out.gui("Wrong. " + side + " " + LookBehaviorUtils.getSelectedBlock().get().offset(side) + " " + positionsToPlace[0], Out.Mode.Debug);
} }
} }
state.setInput(InputOverrideHandler.Input.CLICK_LEFT, true);
System.out.println("Trying to look at " + against1 + ", actually looking at" + LookBehaviorUtils.getSelectedBlock()); System.out.println("Trying to look at " + against1 + ", actually looking at" + LookBehaviorUtils.getSelectedBlock());
return state; return state;
} }