Skip to content

Commit

Permalink
make PositionBreakB stricter for 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
ManInMyVan committed Jan 2, 2025
1 parent a179f3e commit 7955563
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public PositionBreakB(GrimPlayer player) {
}

private BlockFace lastFace;
private final BlockFace releaseFace = player.getClientVersion().isNewerThanOrEquals(ClientVersion.V_1_8) ? BlockFace.DOWN : BlockFace.SOUTH;
private final int releaseFace = player.getClientVersion().isNewerThanOrEquals(ClientVersion.V_1_8) ? 0 : 255;

@Override
public void onBlockBreak(BlockBreak blockBreak) {
Expand All @@ -31,7 +31,7 @@ public void onBlockBreak(BlockBreak blockBreak) {
}

if (blockBreak.action == DiggingAction.CANCELLED_DIGGING) {
lastFace = blockBreak.face == releaseFace ? null : blockBreak.face;
lastFace = blockBreak.faceId == releaseFace ? null : blockBreak.face;
}
}
}

0 comments on commit 7955563

Please sign in to comment.