Huge loot duplication exploit with Mekanism's cardboard box.
Grzesiu447 opened this issue ยท 5 comments
https://imgur.com/a/3sUDII1
You can use Mekanism's cardboard box to get infinite loot from single Lootr chest.
I tried this, because I was curious, if I can move the chests using these boxes (Yes, you can), but I also found this game breaking side effect.
I'm sure there are other mods that can move blocks, so you should probably expect more bugs like that.
Yes, this is unfortunate.
The first issue is: screw tile entity movers. They literally break so many contracts it isn't funny.
I've been using the same system of loot reference since 1.14.4 (the first releeased version of Lootr) and I guess in that time nobody tried to do anything funky with it. I'm not sure why I stuck with position-based loot when I switched to 1.16.4, especially when I went with UUID for entities.
The solution here is to just generate a unique ID for each chest if it doesn't have one, and then use that as the reference.
The current issue will be migrating from the block position, but I think that's doable.
All right, fixed as of cda147b. I'm sure there will be other methods or something about what I've done will come back and bite me in the butt, but at this point I don't care.
It's not fair to provide a method of moving things that were never originally designed to be moved and were never programmed to be movable in the first place. It throws a huge spanner in the works of synchronising inventories and tile entities (as the tile entity for the Lootr chest is no longer the inventory) and thus the visuals of opening/closing the chest and tracking if a player has opened it before.
Not the least problem is that all of the tile-entity movers implement a different system of consent as to whether or not tile entities can be moved. The last time there was any discussion of note about having a "can you be moved" method in tile entities, it just fizzled as there was likely to be any community consent on it.