chronosacaria / MCDungeonsWeapons

Bringing the weapons and tools of Minecraft Dungeons to Minecraft
Other
67 stars 26 forks source link

Crossbow rendering issues when loading #153

Closed BluStryx8 closed 1 year ago

BluStryx8 commented 2 years ago

Describe the bug When loading any crossbow, the crossbow shrinks upon charging to max (when releasing right click would load an arrow into the crossbow). However, the Nautical Crossbow and Harpoon Crossbow disappear while loading, only reappearing when charging to max.

To Reproduce Steps to reproduce the behavior:

  1. Take any crossbow.
  2. Hold right click to load.
  3. When at max charge, the crossbow will automatically shrink. (If using the Nautical or Harpoon Crossbows, the crossbow will disappear while charging instead, and reappear at max charge)

Expected behavior Staying the same size at the end of loading animation

Screenshots 2022-08-31_00 24 39 2022-08-31_00 24 28

Additional context While we're here, some extra small issues:

chronosacaria commented 2 years ago

Mate, you're awesome! Keep 'em coming! This is phenomenal feedback! Thank you!

DaFuqs commented 2 years ago

HeldItemRenderer has lots of Bow and Crossbow methods hardcoded. Unmojanking this is possible, but pain

DaFuqs commented 2 years ago

After way more mixin than I am comfortable with I got bow and crossbow animations working flawlessly.

While I was at it, I also added some useful attributes to bows and crossbows. Maybe those are interesting for you, too. I could make a small lib out of them, if there is interest.

Bow Attributes: https://github.com/DaFuqs/Spectrum/blob/1.18.2/src/main/java/de/dafuqs/spectrum/items/tools/SpectrumBowItem.java

Crossbow Attributes: https://github.com/DaFuqs/Spectrum/blob/1.18.2/src/main/java/de/dafuqs/spectrum/items/tools/SpectrumCrossbowItem.java

DaFuqs commented 2 years ago

(alternatively feel free to steal those. Since it's not using any redirects all mods should be perfectly compatible 👌)

BluStryx8 commented 1 year ago

Hello, back again after a few months (since I took a break from messing with mods to focus on life stuff) 1.19.2 version of the mod has a lot of rendering issues, so I've taken the time to group crossbow rendering errors.

===