Fix storage bus crash on inventory shrink

This commit is contained in:
DBotThePony 2022-05-15 21:50:29 +07:00
parent a911eed753
commit 40a3547595
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -279,7 +279,8 @@ class StorageBusBlockEntity(blockPos: BlockPos, blockState: BlockState) : Matter
} else {
// shrink
for (i in parent.slots until scanned.size) {
removeTracked(i)
if (scannedMap[i] != null)
removeTracked(i)
}
scanned = arrayOfNulls(parent.slots)