forked from RepoMirrors/baritone
codcacy wants these to be combined
This commit is contained in:
parent
afff6395d1
commit
fdd78cf110
|
@ -202,14 +202,13 @@ public class MovementTraverse extends Movement {
|
||||||
Block fd = BlockStateInterface.get(ctx, src.down()).getBlock();
|
Block fd = BlockStateInterface.get(ctx, src.down()).getBlock();
|
||||||
boolean ladder = fd == Blocks.LADDER || fd == Blocks.VINE;
|
boolean ladder = fd == Blocks.LADDER || fd == Blocks.VINE;
|
||||||
|
|
||||||
if (pb0.getBlock() instanceof BlockDoor || pb1.getBlock() instanceof BlockDoor) {
|
if ((pb0.getBlock() instanceof BlockDoor || pb1.getBlock() instanceof BlockDoor)
|
||||||
if ((pb0.getBlock() instanceof BlockDoor && !MovementHelper.isDoorPassable(ctx, src, dest)
|
&& (pb0.getBlock() instanceof BlockDoor && !MovementHelper.isDoorPassable(ctx, src, dest)
|
||||||
|| pb1.getBlock() instanceof BlockDoor && !MovementHelper.isDoorPassable(ctx, dest, src))
|
|| pb1.getBlock() instanceof BlockDoor && !MovementHelper.isDoorPassable(ctx, dest, src))
|
||||||
&& !(Blocks.IRON_DOOR.equals(pb0.getBlock()) || Blocks.IRON_DOOR.equals(pb1.getBlock()))) {
|
&& !(Blocks.IRON_DOOR.equals(pb0.getBlock()) || Blocks.IRON_DOOR.equals(pb1.getBlock()))) {
|
||||||
return state.setTarget(new MovementState.MovementTarget(RotationUtils.calcRotationFromVec3d(ctx.playerHead(), VecUtils.calculateBlockCenter(ctx.world(), positionsToBreak[0]), ctx.playerRotations()), true))
|
return state.setTarget(new MovementState.MovementTarget(RotationUtils.calcRotationFromVec3d(ctx.playerHead(), VecUtils.calculateBlockCenter(ctx.world(), positionsToBreak[0]), ctx.playerRotations()), true))
|
||||||
.setInput(Input.CLICK_RIGHT, true);
|
.setInput(Input.CLICK_RIGHT, true);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (pb0.getBlock() instanceof BlockFenceGate || pb1.getBlock() instanceof BlockFenceGate) {
|
if (pb0.getBlock() instanceof BlockFenceGate || pb1.getBlock() instanceof BlockFenceGate) {
|
||||||
BlockPos blocked = !MovementHelper.isGatePassable(ctx, positionsToBreak[0], src.up()) ? positionsToBreak[0]
|
BlockPos blocked = !MovementHelper.isGatePassable(ctx, positionsToBreak[0], src.up()) ? positionsToBreak[0]
|
||||||
|
|
Loading…
Reference in New Issue