Tinkers' Mechworks

Tinkers' Mechworks

18M Downloads

Duplication issue

Brycey92 opened this issue ยท 0 comments

commented

When any block that retains its inventory/state NBT data when harvested is placed in a drawbridge, extended out, modified, and retracted, the block assumes the original NBT it had when it was placed in the drawbridge. It can then be removed from the drawbridge or extended again, maintaining its original NBT in both instances. This allows for infinite items, infinite power, etc.

Edit: This seems to be the same as issues #34, #44, #62, and #70. Since it seems most don't know of the existence of the blacklist and/or don't want to go through every block in a modpack to test which have dupe issues in drawbridges, I propose doing things the right way. I studied the code, and I discovered the retraction code in DrawbridgeLogic and AdvancedDrawbridgeLogic blindly re-loads the drawbridge inventory ItemStack from a copy created before extension. Instead, it should check if the NBT is different, and if so, copy the new NBT over the one in the buffer, or recreate the ItemStack entirely. I don't know how to create an ItemStack from an in-world block yet, or get the NBT of one, so I implemented a temporary quick-fix in #89.