Skip to content

Commit

Permalink
Update BuildHeight to new height limit
Browse files Browse the repository at this point in the history
  • Loading branch information
airplane authored and Wide-Cat committed Aug 10, 2023
1 parent d72c41c commit 65509bb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ public BuildHeight() {
@EventHandler
private void onSendPacket(PacketEvent.Send event) {
if (!(event.packet instanceof PlayerInteractBlockC2SPacket p)) return;

if (p.getBlockHitResult().getPos().y >= 255 && p.getBlockHitResult().getSide() == Direction.UP) {
if (mc.world == null) return;
if (p.getBlockHitResult().getPos().y >= mc.world.getTopY() && p.getBlockHitResult().getSide() == Direction.UP) {
((BlockHitResultAccessor) p.getBlockHitResult()).setSide(Direction.DOWN);
}
}
Expand Down

0 comments on commit 65509bb

Please sign in to comment.