fix: crash
This commit is contained in:
parent
296fe1efc2
commit
d578db6fb2
@ -62,7 +62,7 @@ class ExchangeItem<E> : Behavior<E>(
|
|||||||
owner.brain.eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE)
|
owner.brain.eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE)
|
||||||
if (closeAt != null) {
|
if (closeAt != null) {
|
||||||
// opened
|
// opened
|
||||||
val chest = level.getBlockEntity(target!!)!!
|
val chest = level.getBlockEntity(target!!) ?: return
|
||||||
if (chest is ChestBlockEntity) {
|
if (chest is ChestBlockEntity) {
|
||||||
ChestBlockEntity.playSound(level, target!!, level.getBlockState(target!!), SoundEvents.CHEST_CLOSE)
|
ChestBlockEntity.playSound(level, target!!, level.getBlockState(target!!), SoundEvents.CHEST_CLOSE)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user