neoforged / NeoForge

Neo Modding API for Minecraft, based on Forge
https://neoforged.net
Other
1.24k stars 179 forks source link

Un-hardcode multiple `canFireProjectile` methods #1681

Open ZestyBlaze opened 1 week ago

ZestyBlaze commented 1 week ago

A suggestion from Commoble to remove the hard coding on AbstractSkeleton.canFireProjectileWeapon and bind it to a Neoforge functionality tag

Currently only contains minecraft:bow within the tag as that is all the vanilla skeleton checks for, added some javadoc to it but maybe specification that it should be items that extend BowItem is required as Crossbow Logic won't work with skeletons

Also open to better naming suggestions if that's a thought

Following a quick discussion, now contains 3 tags and more patches which also remove the hardcoding on Pillager, AbstractSkeleton and Piglin allowing all of these mobs to now use items from their respective tags, which all point towards the common tag for their respective weapons (Bows for Skeletons and Crossbows for Piglins and Pillagers)

neoforged-pr-publishing[bot] commented 1 week ago
ZestyBlaze commented 4 days ago

I'll work on adding a commit for that then and we'll do that in this PR too then I think