[Fabric 1.21.1] Using the belt items overwrites the hotbar item.
M4Lfunct10n opened this issue · 10 comments
I've reproduced this twice now, (unfortunately I lost a nicely enchanted weapon) by using a tool on the utility belt. I swap from one of my hotbar items to the tool in my belt (toggle or hold, both do it) and as soon as I start using it for mining/digging etc, it duplicates itself onto the hotbar slot of the item I was using before moving to the belt tool. This both erases the item on the hotbar as well as creates a duplicate of the item I'm using in the belt.
I managed to consistently reproduce half of the issue when combining only Utility Belt with Better Combat (And their dependencies):

Steps to reproduce:
- Place a Sword in the Off-Hand
- Place another Sword in the first Utility Belt Slot
- Select any Item in the Main Hotbar
- Switch to the Utility Belt Hotbar
- Attack
Result:
The item that was selected in the Main Hotbar before switching to the Utility Belt Hotbar got replaced with the Item used to attack.
Mods Used (MC 1.21.1, Fabric Loader 0.17.1):
Accessories 1.1.0-beta.48
Architectury API 13.0.8
Better Combat 2.2.4
Cloth Config API 15.0.140
Fabric API 0.116.5
JamLib 1.3.5
oωo (owo-lib) 0.12.15.4
playerAnimator 2.0.1
Utility Belt 2.6.0
Why half of the issue?
When reproducing the issue with this setup, all the duplicated items go back to normal when opening the Inventory or the Utility Belt UI. In a big modpack I'm making (370+ Mods), after duplicating the items as seen in this example, they won't go back to normal and interacting with them in any UI will merge them as if they were combined, effectively deleting all the replaced items in the process. I hope that fixing the duplication issue within this setup can fix the item deletion issue as well.
If needed I can try debugging my modpack until I find the exact mod that is causing the other half of the issue (Which naturally will take quite a bit).
Thanks for reading and for working on the mod.
This is my attempt to reproduce the issue: https://streamable.com/99jspp
Not sure how to reproduce it
I also have this issue and I am not sure what causes it. I have lost a few items now due to it, and will update if I have suspicions of a cause.
I've reproduced this twice now, (unfortunately I lost a nicely enchanted weapon) by using a tool on the utility belt. I swap from one of my hotbar items to the tool in my belt (toggle or hold, both do it) and as soon as I start using it for mining/digging etc, it duplicates itself onto the hotbar slot of the item I was using before moving to the belt tool. This both erases the item on the hotbar as well as creates a duplicate of the item I'm using in the belt.
potentially it is caused by an optimization mod? I will remove the ones I recently added and get back to you.
This occurs for me using Travelers backpack, it might be due to some item switching feature of other mods.
In terms of Traveler's Backpack, it's due to using the tool cycling feature (z + scroll/z if you enable the config to disable scrolling)
- Switch to your utility belt slots.
- Have an item on the first slot of the vanilla hot bar.
- Equip a travelers backpack.
- insert a tool in the tool bar of the backpack.
- exit out of the backpack.
- hold a tool in your utility belt slot (cause to cycle, you need to be holding a tool/weapon).
- cycle (z + scroll).
- item on the first slot has been deleted.
Thank you @WxAaRoNxW. I'm not sure if fixing that will fix the issue without travellers backpack, but I'll try given I hopefully have a way to reproduce something now.