P3pp3rF1y / SophisticatedBackpacks

Sophisticated backpacks is yet another minecraft backpack mod this time with backpack you can place in world, color in different color combinations, upgrade with more inventory and enhance with many functional upgrades.
https://www.curseforge.com/minecraft/mc-mods/sophisticated-backpacks
GNU General Public License v3.0
115 stars 77 forks source link

Backpacks duplication/inventory issue #46

Closed jackswav closed 3 years ago

jackswav commented 3 years ago

I started a small modded minecraft server with some friends a couple days ago, and today while 3 of us were on we noticed the backpacks were actin a bit buggy.

It started with me loosing my backpacks inventory and it being replaced with items that were in my other friends backpacks. I disconnected and reconnected to no fix. We all named our backpacks to see if that would change anything, and just a couple minutes later my friend lost some of his inventory.

One of us began disconnecting and reconnecting a bunch, and noticed that every couple of reconnects his backpack inventory would change or even dupe items. I tried this as well and on the fourth reconnect my entire backpack inventory dissapeared.

Once they got off i went into creative to do some testing, and was unable to recreate the issue when I was the only one on the server with spawned in backpacks. All i did was spam the disconnect and reconnect again like before, as well as opened and close the backpack a bunch. While doing this my game started lagging a lot as well, which fixed when after relaunching minecraft.

I crafted a backpack and in survival tested the same steps(still solo) and could not recreate. Speculating, I'm guessing it can only happen when other players are connected. Let me know if you need any info from me, I havent used Github much except for crash logs but in this case there is no crash log to upload.

Thank you! The mod is dope as hell by the way so I really hope we can find a fix.

P3pp3rF1y commented 3 years ago

The version that you use would help as well as if/what other mods are in the pack, but I will guess here that you use JEI and the backpacks were crafted when you had sophisticated backpacks version lower than sophisticatedbackpacks-1.16.4-2.1.1.153 in the pack. That version fixes a bug that only manifested itself when detailed tooltip (the one that shows inventory in tooltip) of a backpack was viewed in jei recipes view.

Btw if you updated after the backpacks were already corrupted that's not going to help as they are already linked to one common storage, that's why relogging didn't help you either. Any backpacks crafted in the latest version shouldn't have this issue.

jackswav commented 3 years ago

I started the world after u released latest version, and I double checked that I have 1.16.4-2.1.1.153 installed.

I'm using 1.16.5 forge 36.0.22 and the following mods:

they had just crafted the backpacks today as well. I've checked that both server and client side for everyone has 1.16.4-2.1.1.153 installed for this mod.

Thank you 4 your help

P3pp3rF1y commented 3 years ago

And are you sure they were crafted and not just cloned from one backpack? Because if you clone them in creative using middle this will happen. I just don't see any mod in there that could be causing it and can't recreate what you're seeing either and actually can't think of a way that this could happen other than the creative clone feature or picking a backpack block in creative

P3pp3rF1y commented 3 years ago

And I wanted to add that given that I can't recreate I will need to get some steps how to recreate the issue I can't do much more other than just repeating again what I have already tried here.

jackswav commented 3 years ago

This is a survival world. I can assure nothing was cloned in creative and they were all crafted using a vanilla crafting table.

Im help desk at my job so I understand the need to replicate the issue... is it possible that this issue could only happen when multiple people are connected? If so, I can do further testing when im playing with friends tonight. Like I said, I could not recreate solo with the same steps I used to recreate with friends online.

jackswav commented 3 years ago

I mean my friends were duping items with it after I got off so I bet we can figure out some steps to recreate for ya xD

jpmv2020 commented 3 years ago

Hey i have a survival server with a couple friends, and i'm having the same issue and i'm using the latest version of your mod. I got the bug to happen with 2 of my backpacks while scrolling really fast, but i'm almost sure it wans't that that caused it, because one of my friends got a bag from other person by just reloging. I will let you know as soon as i find a consistent method.

P3pp3rF1y commented 3 years ago

@jpmv2020 I have similar questions to previously asked for you regarding your issue;

Regarding figuring out that the two backpacks are connected, you can either use the latest dev version of mod here which actually shows uuid of the backpack storage in tooltip or you can force backpack to reload from storage by simply moving it to a different slot or even just picking it up and putting back to the slot (backpack keeps a cached copy of inventory for performance purposes which has no issue when just one backpack is connected to the same storage, but that obviously breaks if another backpack changes the nbt in the storage behind the first backpacks "back")

jpmv2020 commented 3 years ago

I started the server yesterday, so it is the latest version (which came out 6days ago if i'm not mistaken), and the server has no op's so it's really unlikelly that any of us used creative. Until now it only happened before my last reply so, when it does it again, if it does it again, i will let you know.

P3pp3rF1y commented 3 years ago

Alright, when that happens, could you check backpack recipe (in jei's recipe view or in vanilla crafting tables recipe book) and try to display inventory of the recipe result (without taking it out of the result slot) with shift key. One theory I have is that somehow there's still a way for recipe stack to be given to player directly and then it gets storage link assigned and from that point on anyone who crafts the backpack will get linked to that same backpack. I just don't understand what could be causing that. And could you also share what mods you have in your modpack? Perhaps I am missing some mod that may be the cause here so I will try to crosscheck that against other lists I've got.

jpmv2020 commented 3 years ago

Anything i can do to help, just know that i have a lot of mods in this pack...

ServerTabInfo, AbnormalsCore, AmbientSounds, Apotheosis, Aquaculture, Architects_Palette, Architectury, Ars_Nouveau, AttributeFix, AutoRegLib, BetterCaves, BetterMineshafts, Botania, CCTweaked, ChunkLoaders, CodeChickenLib, CookingForBlockheads, Create, CreativeCore, Curios, CustomSkinLoader, CustomStartingGear, DecorativeBlocks, DungeonsPlus, DynamicSurroundings, Emojiful, EnderiteMod, EnderStorage, EnderTanks, EndRemastered, EnhancedVisuals, ExtraBoats, ExtraDisks, ExtraStorage, ExtremeReactors2, FastFurnace, FastWorkbench (<- Could be this one as it applies "faster code" to the vanilla crafting table), FastFurnace (same as the other), FTBGuiLibrary, GeckoLib, GoblinTraders, Gravestone, InventoryHud+, IronChests, IronFurnaces, ItemPhysicsFull, Jei, JeiIntegration, Mantle, Mekanism (Additions, Tools and Generators), MGui, NaturesCompass, NetherPortalFix, Optifine, Patchouli, Placebo, PneumaticCraft, Polymorph, Psi, Quarck, RefinedStorage, RSGauges, ShetiphianCore, Shulkered, SnowUnderTrees, SophisticatedBackpacks, SpartanShields, StorageDrawers, StructureGel, SuperMartijn642ConfigLib, Tetra, TheConjurer, TheAbyss2, TimeSync, TinkersMechworks, TreeChop, WAWLA, Waystones, WorldEdit, XaerosMinimap, YungsApi, ZeroCore2.

All on latest.

City472 commented 3 years ago

I also have the same issue. We are using "sophisticatedbackpacks-1.16.4-2.1.1.153" version of the mod in a 1.16.5 world with forge version "36.0.21" The pack its self is a modified version of "All The Mods 6"

Here is all of our current mods. Modlist.txt

Let me know if you need anymore information

P3pp3rF1y commented 3 years ago

And I have just found an issue that happened on dedicated servers which corrupted recipe results (incorrectly linked them to specific uuid in backpack storage which meant every backpack crafted using that recipe was linked to the same storage). This is now fixed and a new release is up on curseforge. Please grab that and use it. I will leave this issue open for a bit more until I get some confirmation the issue isn't seen with new one or a few days have passed.

P3pp3rF1y commented 3 years ago

Closing this. I am not seeing any additional comments about packs linking to the same storage or players losing items.

KajesLorian commented 3 years ago

I'm having the same issue on sophisticatedbackpacks-1.16.4-2.2.1.183

I can however tell you that the backpacks were cloned from the same backpack. I have an NPC that sells the most basic backpack, so everyone has been buying that.

P3pp3rF1y commented 3 years ago

well if you do that you need to make sure not to open the backpack before you setup the npc with the backpack. Once you open it for the first time it will get uuid of the storage assigned and from that point on if it sells multiple all of them will point to the same storage and you will have this issue. the uuid should be visible in tooltip if you turn on advanced tooltips so that should be easy way to check if you're getting item with uuid already assigned

KajesLorian commented 3 years ago

Thank you, I'll do that then.