diff --git a/common/src/main/kotlin/quaedam/projection/swarm/ai/ExchangeItem.kt b/common/src/main/kotlin/quaedam/projection/swarm/ai/ExchangeItem.kt index c614e5d..a9a03f7 100644 --- a/common/src/main/kotlin/quaedam/projection/swarm/ai/ExchangeItem.kt +++ b/common/src/main/kotlin/quaedam/projection/swarm/ai/ExchangeItem.kt @@ -62,7 +62,7 @@ class ExchangeItem : Behavior( owner.brain.eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE) if (closeAt != null) { // opened - val chest = level.getBlockEntity(target!!)!! + val chest = level.getBlockEntity(target!!) ?: return if (chest is ChestBlockEntity) { ChestBlockEntity.playSound(level, target!!, level.getBlockState(target!!), SoundEvents.CHEST_CLOSE) }