From 68c90c8f8a45cb86af60da0d79c13b21e8ce9ce9 Mon Sep 17 00:00:00 2001 From: xtex Date: Sun, 30 Jul 2023 21:15:03 +0800 Subject: [PATCH] fix: empty containers are always skipped --- .../src/main/kotlin/quaedam/projection/swarm/ai/ExchangeItem.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c184314..b2ee939 100644 --- a/common/src/main/kotlin/quaedam/projection/swarm/ai/ExchangeItem.kt +++ b/common/src/main/kotlin/quaedam/projection/swarm/ai/ExchangeItem.kt @@ -43,7 +43,7 @@ class ExchangeItem : Behavior( if (chest is ChestBlockEntity) { ChestBlockEntity.playSound(level, target!!, level.getBlockState(target!!), SoundEvents.CHEST_OPEN) } - if (chest.isEmpty) { + if (chest.isEmpty && level.random.nextBoolean()) { closeAt = l + 7 } else { closeAt = l + 10 + level.random.nextInt(100)