Sophisticated Backpacks

Sophisticated Backpacks

89M Downloads

Backpack GUI not rendering correctly, possible incompatibility with Curio?

astroACR opened this issue ยท 21 comments

commented

Describe the bug
The backpack GUI renders incorrectly when the backpack is opened while on Curio back slot and if the B bind is used. It also completely overrides your inventory, replacing it with the contents of your backpack until you interact with it (Move an item, for example). Do note that this issue only presents itself when the backpack is in the CURIO back slot, if put on the ground, used on inventory, or used while wearing on chestplate slot, it works perfectly.

To Reproduce
Steps to reproduce the behavior:

  1. Have a server with Mohist, Curio, and Sophisticated Backpacks installed.
  2. Place any backpack in curio back slot
  3. Open with B bind
  4. See error

Expected behavior
Should open just as it would while on inventory, the ground, or on chestplate slot.

Screenshots
Backpack opened while on hand, inventory and GUI unaffected:
image

Backpack opened while on Curio back slot, note how the backpack GUI does not render, and the inventory disappears:
image

Versions
sophisticatedbackpacks-1.16.5-3.12.0.407
Forge version 36.2.19

If you need me to test anything by myself, please do tell me.

commented

@Mickbuttface I definitely need to understand the flow that I should take / what mods are required to recreate as otherwise I am unable to recreate it myself

try running plain 1.18 then going back to the 1.16.5 world I think that's what broke it for me

commented

@Mickbuttface By any chance, do you have the SkinRestorer plugin installed on your server?

No I do not.

commented

@Mickbuttface I definitely need to understand the flow that I should take / what mods are required to recreate as otherwise I am unable to recreate it myself

I literally have too many mods to list that would be helpful, my modpack is over 200 mods, but the main ones I have that impact inventory are Inv Tweaks, CosmeticArmor, Curios, Quark, CustomSkinLoader, CraftingTweaks, and that's all the mods useful I can think of on the spot, ask me for specific mods and I can tell you if I have them or not, To recreate this issue, for me its consistent, in when I updated the mod, it caused my backpack inv to be shrunken.

commented

Aight bet

commented

@Mickbuttface This doesn't help. So many people update to later versions of the mod and just a few of them have this issue. I also do that myself and haven't seen this. I have made a bit of a change to opening recently and fixed opening subbackpacks (if backpack has inception upgrade) in the latest release. But as said if there was an issue with just the simple opening of backpack in curios slot I would have tons of people telling me about that as that's how most people use these.

So I will need concrete steps on how to recreate and what mods need to be used.

commented

I am not entirely sure what's going on there for you. At first I thought this is broken on a multiplayer server (because I have Curios in test environment and regularly open backpack from there especially given that there were some changes related to open backpack keybind in the last release), but just retested and I can't recreate. Could you try with a different backpack? And if that's still broken could you tell me what exact steps you take before you put the backpack in the curio slot? (e.g. just craft and put in there directly or whether you open it first before putting there, ...)

commented

The steps used for the screenshot above were:

Get items for crafting, and craft a normal backpack, then an iron backpack in survival.
Do or do not put anything in it and wear it on Curio back slot, press B, and the GUI displays as such.

I will test all other backpacks on my server right now.

Do note that this issue only presents itself when using Curio slots. I have other mods besides Sophisticated Backpacks (sophisticatedbackpacks-1.16.5-3.12.0.407) that use Curio and add Curio slots (curios-forge-1.16.5-4.0.5.3), such as Cosmetic Armor Reworked (CosmeticArmorReworked-1.16.5-v4), Colt's Cosmetic Armor (ColtCosmeticArmorMod-1.2.5), and Expanded Combat (expanded_combat-2.3.1-beta_0-1.16.5).

commented

Couldn't replicate, somehow the issue fixed itself, as soon as it happens again and I know how to replicate it, I'll reopen the issue.

commented

Basically the only way I see this happening is when the backpack can be found in the slot on server but couldn't be found there on client side (in which case on clientside it reads the number of slots as 0 and thus doesn't create slots for those, but then server tries to synchronize the backpack slots and that overwrites the player ones) and at this point I am not clear how that could happen. So that's just perhaps a clue in case that would be helpful.

commented

I too have been having this issue. I'm also on a modded server with curio, and the backpack gui is behaving like this as well. I can provide more information/screenshots if necessary, just anything to fix this problem

commented

I found a fix that works is to quit then open the launcher on a dif profile then quit that and go back to your would. idk but it worked for me.

commented

@Mickbuttface By any chance, do you have the SkinRestorer plugin installed on your server?

commented

@Mickbuttface I definitely need to understand the flow that I should take / what mods are required to recreate as otherwise I am unable to recreate it myself

commented

I'm also having the same issue.

The server and the client have matching mods and versions, and the backpack works for others but not me. Have tried many different backpacks, none of them work.

The modpack that's being used is Valhelsia 3.4.8, but I don't know how useful that is. It has curios, the same as everyone else.

The backpack was working previously, however after some time and at an unknown point it stopped working. I cannot get it to return to an unbroken state so that I can recreate it.

I can attempt to provide a specific modlist, if that would help, as well as any logs that could be pertinent.

commented

@ChucklesMcFuckles And this happens for you for any new backpack? Would you be able to check the nbt data of the backpack? NBTExplorer or similar tool should be able to do it. I am in particular looking for inventorySlots and upgradeSlots nbt properties of the backpack as these determine number of slots to be displayed.

commented

To answer your question, yes it was happening with all backpacks I used in the Curio slot, no I wasn't able to get the NBT data, and yes the backpack opened in every location I put it except the curio slot.

However, I was able to solve the issue.

What I did was go into single-player, and open my backpack in the Curio slot in SP, then when I returned to MP it worked fine, and is still working fine. Don't know what that entails, but if the issue reoccures I'll work on getting the NBT data for you.

commented

actually looking at code another possibility is that on client the backpack isn't in the same slot that it is on server so potentially there could be conflict with some mod that messes with slot indexes. That said does this happen for you for backpacks open from your hand or using keybind (or both) and if the keybind where are the backpacks placed - curios / chest slot / top part of player's inventory / hotbar slot?

commented

@P3pp3rF1y

The issue has reoccured, and I have procured the NBT data. Looking at it myself, the backpack says it has 120 slots, but it's not opening properly regardless.

I have the zip attached, hopefully it helps. It's the player data direct from the server host out of the server's world folder.

NBTData ChucklesMcFuckles.zip

commented

Another new issue is occurring, possibly being related to the backpack GUI not working properly in multiplayer.

When in SP, and the backpack is in the Curio slot, randomly when I load into the world, the backpack refuses to open. It's only sometimes it works, and sometimes it doesn't, and it changes on world load. However, the same times it doesn't work in SP, are the same times it doesn't work in MP. It's the same thing when it's working as well.

As you said, it seems to be a client issue occasionally, but I don't know how I'd be able to see what's going on.

commented

I believe I know what's happening there - something is triggering use of backpacks before curio integration has a chance to register its handler. And when that happens the curio handler doesn't get added to the list of those used in opening backpacks / those where automated upgrades should work. I have a quick fix for that in dev and will be releasing that soon.

commented

There's a new release on curseforge with the fix I mentioned above. That should fix this issue for you so I am going to close this issue and if it reoccurs please open a new one.