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

Add conventional tag for all animals #1596

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

Conversation

CammiePone
Copy link

I'm currently working on a mod, and found a sudden need for a tag that included all animals, ideally one that other mods would include their animals in. It doesn't exist in the base game, and this is the next best thing.

As for why I can't just use an instanceof check, it's because I also need to cover players, illagers, villagers, and wandering traders while still allowing the list of acceptable entities to be configurable by the end user. I'm using a tag of my own, and then including players, villagers, and wandering traders explicitly, then using the existing minecraft:illagers tag for all the illagers, and would like to use a c:animals tag for animals.

@CLAassistant
Copy link

CLAassistant commented Oct 16, 2024

CLA assistant check
All committers have signed the CLA.

@neoforged-pr-publishing
Copy link

  • Publish PR to GitHub Packages

@CammiePone
Copy link
Author

I've also already made a PR to Fabric API FabricMC/fabric#4168

@ApexModder
Copy link
Contributor

If we are going to be adding c:animals would it also make sense to expand this to include subtags for animals with more than 1 variant? c:animals/fish, c:animals/llama, c:animals/squid, c:animals/horse etc

@CammiePone
Copy link
Author

If we are going to be adding c:animals would it also make sense to expand this to include subtags for animals with more than 1 variant? c:animals/fish, c:animals/llama, c:animals/squid, c:animals/horse etc

if other people want it, im down to make it happen

@Gaming32
Copy link
Contributor

Should this be generated by running over BuiltInRegistries.ENTITY_TYPE and checking the category instead of hardcoding the entities? That would also reduce future maintenance, as the tag would be automatically updated. Though that doesn't allow the tag to be split into subtags.

@ZestyBlaze
Copy link
Contributor

The only problem with that is it doesn't let modders opt-in to if the animal is in the tag or not, or what if they've made an animal but extended a different class for some reason. It would need to be written like Cammie has I believe, but I do agree with Apex and think we should extend it out into subtags too, especially for ones like squids and fish

@Gaming32
Copy link
Contributor

Mods would not be affected by how the tag is generated. NeoForge datagen is only run in the NeoForge repo. But the downside is, of course, the lack of ability to do subtags, and I do think subtags should be done.

@CammiePone
Copy link
Author

I considered iterating over all entities in the registry and grabbing those that extended Animal, but i didnt because none of the other tags did. I felt like parity with how the other tags were handled was better, even if it was more annoying on my end to have to write everything manually. happy to change it in whatever way though

@ZestyBlaze
Copy link
Contributor

Definitely stick with what you have so far, don't generate it automatically. I do think maybe if more people agree about subtagging the animals that might be a good shout

@TelepathicGrunt
Copy link
Contributor

TelepathicGrunt commented Oct 24, 2024

dont generate automatically tbh. And subtagging every individual animal may be overkill. Might be better to wait for some modders to come in with actual use cases first that would use the subtags

TelepathicGrunt added a commit to TelepathicGrunt/NeoForge that referenced this pull request Nov 9, 2024
@TelepathicGrunt
Copy link
Contributor

Some ambiguity and objections came up here.
FabricMC/fabric#4168 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants