fix the fire thing in a slightly different way

This commit is contained in:
Leijurv
2018-11-29 20:36:19 -08:00
parent 5daaaf5282
commit 6a402b4a2b
2 changed files with 14 additions and 2 deletions

View File

@@ -151,9 +151,10 @@ public abstract class Movement implements IMovement, MovementHelper {
somethingInTheWay = true;
Optional<Rotation> reachable = RotationUtils.reachable(ctx.player(), blockPos, ctx.playerController().getBlockReachDistance());
if (reachable.isPresent()) {
Rotation rotTowardsBlock = reachable.get();
MovementHelper.switchToBestToolFor(ctx, BlockStateInterface.get(ctx, blockPos));
state.setTarget(new MovementState.MovementTarget(reachable.get(), true));
if (Objects.equals(ctx.getSelectedBlock().orElse(null), blockPos)) {
state.setTarget(new MovementState.MovementTarget(rotTowardsBlock, true));
if (Objects.equals(ctx.getSelectedBlock().orElse(null), blockPos) || ctx.playerRotations().isReallyCloseTo(rotTowardsBlock)) {
state.setInput(Input.CLICK_LEFT, true);
}
return false;