Silent Gear

Silent Gear

30M Downloads

Crossbows destroy gear arrows

SilentChaos512 opened this issue ยท 2 comments

commented

Versions

  • Silent Gear: 2.4.0
  • Silent's Gems: N/A
  • Silent Lib: 4.9.x
  • Forge: 34.1.42

Expected Behavior

Gear arrows to not be destroyed by crossbows and work correctly, like they do with both vanilla and gear bows.

Actual Behavior

Crossbows will take the entire "stack" of arrows, as crossbows do not call ArrowItem#isInfinite that bows do before deciding what to do with the ammo stack. It just "splits" the stack, completely removing it from the inventory. The first shot is retrievable, but the damage value gets maxed out (leaving the arrows "broken"). The retrieved stack can be repaired, but no longer functions correctly. Any further arrows the player shoots cannot be retrieved.

How to Fix

Unknown currently. Worst case, this might require a Forge patch, as the ArrowItem#isInfinite method and calls to it appear to be added by Forge.

commented

Made a partial fix that seems to be working correctly for gear crossbows. But vanilla crossbows (and likely crossbows from other mods) will still destroy arrows.

commented

Likely not fixable on your end due to the enchant not being from your mod, but worth mentioning in case it is something that helps with this bug.
Adding certain enchants will cause Gear Crossbows to seemingly behave like vanilla crossbows, causing issue 270 to happen despite your partial fix, as well as weirdly affecting the damage. The enchant I applied increases damage, maybe it has something to do with overriding the stats entirely?

(seemingly only modded enchants; vanilla Quick Charge enchant does not affect it but Enigmatic Legacy's Sharpshooter enchant does cause what I describe)