Closed InputandOutput closed 1 month ago
Can this issue be reproduced with only RPG Inventory installed? Or is Better Combat required?
Better Combat is required for dual-wielding attacks. Without better combat, it's just the main hand swinging vanilla Minecraft style.
okay Does one of the equipped weapons weapon_attribute have a "two_handed" value set to true?
Likely not, since I was testing with vanilla swords and vanilla mace that were able to be dual-wielded for the bug to occur. Should I record what I see for better understanding?
Okay, thanks for the information! I'll try to reproduce this issue
A recording of the bug could be quite helpful! :)
I managed to duplicate the main hand weapon, when an offhand weapon is equipped.
The ghost item always appears in the 9th hotbar slot, regardless of where the mainhand itemstack was located before. When another item is in the 9th hotbar slot, the following happens:
If attacks were done only with the mainhand weapon, the ghost item vanishes, when unequipping the mainhand weapon and the item in the 9th hotbar slot returns. Leaving and reentering the world also removes the ghost item and returns the other item.
As soon as an attack with the offhand weapon is done, the ghost item vanishes, when unequipping the mainhand weapon and the item in the 9th slot does not return. Leaving and reentering the world also replaces the other item with the ghost item, which is no longer a ghost item, but fully functional.
This behaviour stays the same after a full game restart.
Is this the same issue you are having? Or are there differences?
The issue you're describing seems to be similar to the issue I am having. Here is a video that shows what I am experiencing on survival mode.
https://github.com/user-attachments/assets/8bfa78e1-6aac-4735-9042-6d5cec49f40c
Not seen is me duplicating the mace on full game restart.
Can you go into the client options of RPG Inventory and set the "Always show selected hotbar slot" option to true?
In my testing the ghost item is always placed in the selected hotbar slot. Can you confirm that behaviour?
Thanks!
Yes, the selected hot bar slot is always the spot where the ghost item appears. Funnily enough, I can also reproduce the easy duping by sheathing, then interacting with the now-legit "ghost" item.
Sheathing also creates a ghost item?
Or is the ghost item still created by attacking?
I managed to fix the ghost item creation on attacking.
It's actually an issue with Better Combats off hand attacking
Currently making sure that my fix has no unintended side effects
After creating a ghost item and sheathing, the main hand item and the item in the hotbar are effectively legit items (i.e., hotbar item not deleted when interacting with the main hand item). As shown below:
https://github.com/user-attachments/assets/72a74546-03eb-445a-9324-eff88f6204cb
I will implement my solution in "Better Combat Extension"
This solution is very much experimental, which is why it is not implemented in Better Combat right now.
"Better Combat Extension" has been updated with the fix for this bug. Please report any problems that might come up in Better Combat Extensions GitHub
With a custom mod pack that has rpg inventory and better combat installed (with necessary dependencies), trying to equip weapons in both the main hand and off hand will result in "ghost items".
In survival, trying to equip the main hand while the offhand occupies a weapon and swinging results in the main hand weapon "appearing" in the same slot that the main hand weapon used to occupy. Interacting with the ghost item in the inventory "unequips" the main hand weapon, while interacting with the main hand weapon in the rpg inventory main hand slot causes the weapon in the inventory to "disappear".
In creative mode, instead of disappearing, the main hand weapon may be duplicated. Mainhand/offhand behavior is normal when rpg inventory is disabled and Better Combat is enabled.
Yeah idk what to make of this