mirror of
https://github.com/GTNewHorizons/Mantle.git
synced 2026-11-13 00:37:35 +00:00
Prevent DropLecternBookPacket from running if relevant chunk is not loaded
This commit is contained in:
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)) {
|
||||
|
||||
Reference in new issue
Block a user