CC: Tweaked

CC: Tweaked

65M Downloads

[NeoForge] Double chests as inventory peripheral detach and reattach on interaction

Shiranuit opened this issue ยท 2 comments

commented

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

latest.log
debug.log

Video

CC.Peripheral.Detach.mp4
commented

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!

commented

Ah thanks, sorry for the duplicate, I didn't found this issue when searching for this odd behaviour.