weird ladder bug, fixes #51

This commit is contained in:
leijurv 2018-08-17 20:46:53 -07:00
parent f23683fbaa
commit 0f56af65b1

View File

@ -154,7 +154,7 @@ public class MovementTraverse extends Movement {
boolean isTheBridgeBlockThere = MovementHelper.canWalkOn(positionsToPlace[0]) || ladder;
BlockPos whereAmI = playerFeet();
if (whereAmI.getY() != dest.getY() && !ladder) {
System.out.println("Wrong Y coordinate");
displayChatMessageRaw("Wrong Y coordinate");
if (whereAmI.getY() < dest.getY()) {
state.setInput(InputOverrideHandler.Input.JUMP, true);
}
@ -168,6 +168,11 @@ public class MovementTraverse extends Movement {
if (wasTheBridgeBlockAlwaysThere && !BlockStateInterface.isLiquid(playerFeet())) {
player().setSprinting(true);
}
Block destDown = BlockStateInterface.get(dest.down()).getBlock();
if (ladder && (destDown instanceof BlockVine || destDown instanceof BlockLadder)) {
new MovementPillar(dest.down(), dest).updateState(state); // i'm sorry
return state;
}
MovementHelper.moveTowards(state, positionsToBreak[0]);
return state;
} else {