TheRedBrain / rpg-inventory

MIT License
1 stars 0 forks source link

Weirdness when Equipping Weapons in Offhand and Main Hand #22

Open InputandOutput opened 1 day ago

InputandOutput commented 1 day ago

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

TheRedBrain commented 1 day ago

Can this issue be reproduced with only RPG Inventory installed? Or is Better Combat required?

InputandOutput commented 1 day ago

Better Combat is required for dual-wielding attacks. Without better combat, it's just the main hand swinging vanilla Minecraft style.

TheRedBrain commented 19 hours ago

okay Does one of the equipped weapons weapon_attribute have a "two_handed" value set to true?

InputandOutput commented 15 hours ago

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?

TheRedBrain commented 6 hours ago

Okay, thanks for the information! I'll try to reproduce this issue

A recording of the bug could be quite helpful! :)

TheRedBrain commented 6 hours ago

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:

This behaviour stays the same after a full game restart.

Is this the same issue you are having? Or are there differences?

InputandOutput commented 3 hours ago

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.