Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Un-hardcode multiple canFireProjectile methods #1681

Open
wants to merge 3 commits into
base: 1.21.x
Choose a base branch
from

Conversation

ZestyBlaze
Copy link
Contributor

@ZestyBlaze ZestyBlaze commented Nov 10, 2024

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
Copy link

  • Publish PR to GitHub Packages

@sciwhiz12 sciwhiz12 added enhancement New (or improvement to existing) feature or request 1.21.3 Targeted at Minecraft 1.21.3 labels Nov 18, 2024
@sciwhiz12 sciwhiz12 removed the request for review from TelepathicGrunt November 18, 2024 12:19
Copy link
Member

@sciwhiz12 sciwhiz12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're modifying AbstractSkeletons to accept a tag of bows rather than only the singular bow item, should we also modify Pillagers and Piglins for a corresponding tag for crossbows? (We also have a c:tools/crossbow for that.)

@ZestyBlaze
Copy link
Contributor Author

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

@ZestyBlaze ZestyBlaze changed the title Un-hardcode AbstractSkeleton.canFireProjectile Un-hardcode multiple canFireProjectile methods Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.21.3 Targeted at Minecraft 1.21.3 enhancement New (or improvement to existing) feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants