Prevent DropLecternBookPacket from running if relevant chunk is not loaded

This commit is contained in:
Arthur (fuj1n) Uzulin committed 2021-06-27 05:09:59 +10:00
1 parent 420b97c7aa
commit 1bfb522b99
1 file changed
+5
@@ -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)) {