From 17e00615da090302f2007c23175183f034378384 Mon Sep 17 00:00:00 2001 From: AverageGithub Date: Wed, 28 Feb 2024 15:50:00 +0100 Subject: [PATCH] Fix issue --- .../kotlin/com/artillexstudios/axminions/minions/Minion.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt b/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt index 1b70ea9..c5a198c 100644 --- a/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt +++ b/common/src/main/kotlin/com/artillexstudios/axminions/minions/Minion.kt @@ -566,7 +566,9 @@ class Minion( if (ticking) { Scheduler.get().runAt(linkedChest) { - linkedInventory = (linkedChest?.block?.state as? Container)?.inventory + if (linkedChest!!.world!!.isChunkLoaded(linkedChest!!.blockX shr 4, linkedChest!!.blockZ shr 4)) { + linkedInventory = (linkedChest?.block?.state as? Container)?.inventory + } } } else { linkedInventory = null