Closed Thelnfamous1 closed 1 year ago
It's worth noting we have recognized that the issue is triggered on our end because we accidentally added attack damage attribute to all of our ranged weapons, which causes them to pass your "isWeapon" check. Still, I would either implement the above change and/or also check that the item has an attack speed attribute in "isWeapon".
Thanks, I'll add this to the next release.
Done! Thanks for the excellent bug report, I apologize for the delay.
When a user uses both our mods together, the game crashes when the Dual Crossbow is held.
https://github.com/Infamous-Misadventures/Dungeons-Gear/issues/213
I've pinpointed the issue to this line of code (and the equivalent one for the offhand weapon) not verifying to see if the weapon even has an attack speed attribute (our dual crossbows don't). I suspect a similar crash would also occur if our other non-melee weapons are held.
https://github.com/theishiopian/Parrying/blob/b4b39eb92a778c9d663b2225b5f9c700c6f3a6a9/src/main/java/com/theishiopian/parrying/Mixin/PlayerMixin.java#L27
It appears to be a simple fix by checking if the attribute is on each of the weapons before getting them, you can change the "get().getAmount()" calls to "map(modifier -> modifier.getAmount()).orElse(0)".