
[NeoForge] Double chests as inventory peripheral detach and reattach on interaction
Shiranuit opened this issue ยท 2 comments
Minecraft Version
1.21.x
Version
1.115.1
Details
What happens
Double chests as peripherals detach and reattach themselves each time the inventory is interacted with by a Player / Computer / Hopper, seems to be anything updating the inventory.
This doesn't happen with single chests.
The side effect of this is that methods that interact with the peripheral might interract with it in between the detach
and attach
events causing the method to not behave as expected.
For example calling chest.size()
might return a nil value instead of a number.
Calling chest.pushItems(...)
might return nil instead of the number of transferred items or throw an error No peripheral: minecraft:chest_X
because the destination peripheral might be detached if its inventory was updated in between calls.
I didn't test another mod loader at the time, to see if that might because of NeoForge or a more general issue
NeoForge: 21.1.174
Logs
Video
CC.Peripheral.Detach.mp4
Thanks for the report! This appears to be another instance of #1817. It's a really nasty bug, and the main reason CC:T is still marked as alpha for these versions!