[Mod Conflict] Cobblemon Restoration Tank
JPAKx4 opened this issue ยท 1 comments
When connected to the storage network, the restoration tank (As multiblock or on it's own) throws an index out of bounds exception when ticking InventoryConnectorBlockEntity. This crashes the server.
This is the file for the restoration block: https://gitlab.com/cable-mc/cobblemon/-/blob/main/common/src/main/kotlin/com/cobblemon/mod/common/block/RestorationTankBlock.kt
I am a Cobblemon dev so if the restoration block needs to be changed to create compatibility then feel free to let me know and/or point me in the right direction.
It's an issue in your code here:
https://gitlab.com/cable-mc/cobblemon/-/blob/main/common/src/main/kotlin/com/cobblemon/mod/common/block/entity/RestorationTankBlockEntity.kt#L121
You return -1 that's then crashing inside Fabric API, you have to return an empty array instead.
This will crash with every mod that's trying to interact with the block's inventory.