Fix storage bus not passing side to neightbour

This commit is contained in:
DBotThePony 2022-06-29 18:00:31 +07:00
parent 532949e335
commit 0dcf8d68c1
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -156,7 +156,7 @@ class StorageBusBlockEntity(blockPos: BlockPos, blockState: BlockState) : Matter
return
val front = blockPos + blockState.getValue(RotatableMatteryBlock.FACING_FULL)
val storage = level?.getBlockEntity(front)?.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY)?.let { if (it.isPresent) it else null }
val storage = level?.getBlockEntity(front)?.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, -blockState.getValue(RotatableMatteryBlock.FACING_FULL))?.let { if (it.isPresent) it else null }
if (neighbour != storage) {
neighbour = storage