amadornes / MCMultiPart

A universal multipart API for Modern Minecraft
Other
67 stars 22 forks source link

breakBlock call resets RS nodes #112

Closed raoulvdberge closed 6 years ago

raoulvdberge commented 6 years ago

See https://github.com/raoulvdberge/refinedstorage/issues/1576

2xsaiko commented 6 years ago

Where is that configuration stored? My blocks don't lose their NBT when converting to a Multipart. Then again, they are mostly cables which don't store a lot of data/do very much

raoulvdberge commented 6 years ago

Mcmp calls breakBlock which makes RS think the node is broken and resets state.

2xsaiko commented 6 years ago

Ahh, I see.

EDIT: You could either insert a if (world.getBlockState(pos).getBlock() == MCMultiPart.multipart) return; (or similar) check at the start of BlockNode#breakBlock or it could be added to MCMultiPart the hacky way (I don't think there's any good way to do this because Chunk#setBlockState calls breakBlock which can't easily be modified. There is a way to do this (using reflection), though) What do you think, @amadornes ?