copygirl / WearableBackpacks

Minecraft mod which adds beautiful, balanced backpacks
MIT License
61 stars 35 forks source link

Equipped Backpack goes to player inventory and throws items on the ground when sleeping in a SleepingBag mod sleeping bag. #20

Open JoelZBub opened 7 years ago

JoelZBub commented 7 years ago

MC version : 1.10.2 Forge Version : 12.18.3.2254 Backpacks version : 1.10.2 -1.6.0 Conflicting mod : SleepingBad version : 1.10.2-1.4.0

When sleeping in sleeping bag while backpack from Wearable Backpacks is equipped, the sleeping bag disappears, player does not sleep and backpack goes to player's inventory, and backpack, contents are thrown from inventory onto the ground.

Issue reported to SleepingBag repository here: https://github.com/shadowfacts/SleepingBag/issues/14

copygirl commented 7 years ago

That certainly is a conflict that might not possible to solve due to how the two mods are designed. Backpacks, for example, are specifically made in a way that the item never stores the backpack's contents. They're stored on the entity that has the backpack equipped, or the tile entity when placed down. When a backpack is unequipped by irregular means, the wearer dies or the block is broken without being equipped, it will drop everything inside it.

To avoid this issue, you may turn off the equipAsChestArmor config setting.

To fix this issue on my end, I can only think of storing the contents on the item. To fix this issue on SleepingBag's end - without changing the mechanic where the bag item is equipped briefly - the only solution I can see is temporarily moving the backpack to the "hidden" backpack "slot".

Regarding the sleeping bag disappearing, I don't quite know how that's happening.

JoelZBub commented 7 years ago

Thanks for the response. For the purposes of the modpack this is in, I suppose setting equipAsChestArmor to false will be an acceptable workaround, although I assume this would also disable other players accessing backpack inventories. I'll leave this open until I get a response from shadowfacts/SleepingBag to see if there will be any solution, and let you close it as you see fit. Thanks again.

copygirl commented 7 years ago

although I assume this would also disable other players accessing backpack inventories

It doesn't disable that feature. The backpack will function identical, including it rendering on players. The only difference is where the item is stored when equipped. It also doesn't function as armor, and doesn't wear down and break.