From 1bfb522b997bc2cdf912e05cae00ecad02fff9bd Mon Sep 17 00:00:00 2001 From: "Arthur (fuj1n) Uzulin" Date: Sun, 27 Jun 2021 05:09:59 +1000 Subject: [PATCH] Prevent DropLecternBookPacket from running if relevant chunk is not loaded --- .../mantle/network/packet/DropLecternBookPacket.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/slimeknights/mantle/network/packet/DropLecternBookPacket.java b/src/main/java/slimeknights/mantle/network/packet/DropLecternBookPacket.java index fc7dde8..19ce509 100644 --- a/src/main/java/slimeknights/mantle/network/packet/DropLecternBookPacket.java +++ b/src/main/java/slimeknights/mantle/network/packet/DropLecternBookPacket.java @@ -38,6 +38,11 @@ public class DropLecternBookPacket implements IThreadsafePacket { } ServerWorld world = player.getServerWorld(); + + if(!world.isBlockLoaded(pos)) { + return; + } + BlockState state = world.getBlockState(pos); if(state.getBlock() instanceof LecternBlock && state.get(LecternBlock.HAS_BOOK)) {