Sophisticated Backpacks

Sophisticated Backpacks

89M Downloads

Backpacks Can Generate Overlapping UUIDs

ElectricVersion opened this issue ยท 5 comments

commented

I'm running a fairly large 1.18 modded server including Sophisticated Backpacks. Over the past year there have been several instances where backpacks were crafted or bought that generate overlapping UUIDs, leading to items getting erased when the mod tries to 'deduplicate' them and assign a new UUID. I have checked that the Simple Shop block selling them at our spawn area does not have a UUID assigned.

I've checked the previous bug reports and have seen this issue reported multiple times, but generally it was a case of overlapping UUIDs being assigned due to player error. In this case the mod itself seems to be (occasionally) assigning multiple backpacks to the same UUID.

commented

I don't know of a way to generate duplicate UUIDs in usual survival, the only survival method I am aware of is if mod has a loot duplication method that can dupe the backpack including its UUID, other than that it's either duplicating them in creative or player getting from something like quest or shop with UUID assigned.
The method that generates the UUIDs is the standard Java one which has a chance of 10^-37 to generate a duplicate. So yeah is is quite impossible to get a duplicate.

So I will need steps to recreate before I can do anything more here and would ask you to double check that the shop really isn't including UUID.

commented

I have triple checked that the shop doesnt include UUID - I will include the result of the /data get block command for clarity: {owner_part2: -6196193418649837330L, z: 54, x: -351, inv: {Items: [{Slot: 0b, id: "sophisticatedbackpacks:backpack", Count: 1b}, {Slot: 1b, id: "decimal_coins:coin_5", Count: 1b}]}, inv_nr: 0, owner_part1: 5356272054578728717L, gains_nr: 3616, id: "simpleshops:simple_shop", y: 70}

I to my knowledge, simple shops is the only mod on our server that would allow players to potentially duplicate UUIDs, and for that reason any player shops selling backpacks are required to be checked by staff.

The only other lead I can really offer is that it seems to only occur when a player places a backpack down and then picks it back up. A large portion of our playerbase uses backpacks as stationary storage - I'm not sure if that could be related, or if adding Sophisticated Storage to our modpack to reduce that practice would help prevent the bug.

commented

To be honest I have no idea what could be causing it just for you. The stuff with placing down on the ground and picking up is extremely common and I would have likely hundreds of reports if this was happening to others. If you can give me steps how I can recreate the issue I can take a closer look otherwise there isn't much I can do as I have already double checked that java randomUUID is used for backpacks that don't have UUID and that will produce unique UUIDs (well in theory it can produce a duplicate but that is as likely as a single person winning 5 major lotteries).

commented

Yeah, that makes sense. Unfortunately there doesn't seem to be a clear pattern to it so unless I can figure out any more specifics I understand it's pretty much out of your hands. I appreciate your time regardless, if I find anything else out I'll update you, but till then I'll just keep an eye out.

commented

I am guessing this issue hasn't happened since so I am closing