Closed senkosan420 closed 9 months ago
I don't know how to change the code now but the method shouldn't be static, sorry.
You can update it by git push
ing to the BowExtensionsFov
branch in your fork of this repository. GitHub will update this PR automatically.
Looks good to me. This was also suggested as a PR to Netherite Plus (OroArmorModding/Netherite-Plus-Mod#144).
There is a problem with this method though, and it's that it doesn't support the getCustomPullProgress
method. Which will leads to the zoom being offset, and I have confirmed this through my own testing.
Ah I was wondering about that, but I assumed the getTicksUsing
would work for that.
This isn't the right solution.
getCustomPullProgress
does not have to behave like the vanilla; it can scale however it likes with time (for example, a bow could only hold its max charge for 20 ticks before losing strength). If we provide that flexibility in the API, then the FoV rendering must to be equally flexible.So, one of two paths needs to be taken:
* Remove getCustomPullProgress (a breaking change), and replace it with `maxDrawDuration`, which always behaves like the normal bow with a faster/slower draw time (however maybe the ItemStack could be passed in to the method for some flexibility) * Mixin getSpeed to use a custom FoV interpolation based only on `getCustomPullProgress`
Well, now what...?
Wait why did you closed it? OroArmor proably waited for the QSL 1.20.2 to release to merge this after.
Since drawing an item that implements BowExtensions doesn't change the FOV, I thought it would be nice to add it. (Also ignore the first two commits, I originally didn't create the file properly)