Marium's Soulslike Weaponry

Marium's Soulslike Weaponry

4M Downloads

[Compat] Make Ranged Weapon API able to scale bows within the mod [1.20.1/Fabric 0.15+]

pokesmells opened this issue · 10 comments

commented

Hello there! The Ranged Weapon API does not seem to be compatible with bows present within your mod possibly due to a vanilla use method not being used for bows?

This has made it indirectly incompatible with my mod, PlayerEx, and some other mods that utilize its attributes for ranged damage scaling.

If you are able to procure compat with this API, it would be greatly appreciated :)

Have a wonderful day.

commented

Sure, will do, thanks for bringing it up.

commented

Hi will this ever be implemented?

commented

Yeah, rewriting will be inevitable. I'm going to implement Projectile Damage Attribute API instead since it has more versions available and opens more compat with the attribute added, I'll make sure to make it work with your mod as well.

commented

Sorry for the wait, I just looked into it and I was hoping I could use the API in every version I have (1.18.2, 1.19.2 and 1.20.4). Since only a 1.20.1 version is out, I'm not sure I want to rely on that API without worrying if they will ever update in time to future versions too. I will do my best to make it compatible though, I'll mention it here if I do decide to use it.

commented

If not using the API, then perhaps changing the way your bows are registered since they don't use the vanilla use method for bows, which makes it seem like a completely different item and now a bow in the game, some other mods do this but if that were to be done I believe it would just work out the box without you having to force compat, but this would also mean you'd have to rewrite a portion

commented

Having the two will clash due to almost all mods that previously used projectile damage attribute, switching to ranged weapon API in 1.20.1

Another issue is that the way PlayerEx works, in the old and new alphas present right now on 1.20.1, is that it clamps onto ranged weapon API's damage attribute and uses it for scaling. Bows that are 'vanilla' in the backend automatically use that once the API is detected which allows for clean scaling along all bows.

This would essentially make it so that it still wouldn't be compatible with your mod's bows 😭

commented

God, what a pain. Alright, screw it, I'll add the Ranged Weapon API for fabric only and only 1.20.1 and up, hopefully other mods won't have issues with it lol.

commented

Made a decent implementation I am happy with that should also solve future incompatibility issues since the bows and crossbows no longer override the use methods, will be live in the upcoming update. Thanks again for pointing the issues out.

commented

Other than that your implementation works amazing!
image

commented

Made a decent implementation I am happy with that should also solve future incompatibility issues since the bows and crossbows no longer override the use methods, will be live in the upcoming update. Thanks again for pointing the issues out.

image

Is projectile Damage Attribute required for 1.20.1? It says it is, but at the same time it loads up perfectly fine without it on this version :o When downloading the update or mod from CF it automatically installs projectile damage attribute