Ears (+ Snouts/Muzzles, Tails, Horns, Wings, and More)

Ears (+ Snouts/Muzzles, Tails, Horns, Wings, and More)

1M Downloads

API for getting Ears features from a player

hibiii opened this issue ยท 5 comments

commented

Title says it all. My dev environment is Fabric for 1.17+ with yarn mappings.

I'm trying to make a mod that shows a badge next to a player's name and I have to resort to calling EarsMod.getEarsFeatures() directly because I couldn't figure out a way to do it with the API alone.

Additionally, since getEarsFeatures() will eventually call the player list entry of the client player entity, would it possible for this interface to also check by list entry?
With client player entities, I'd need to write boilerplate more cursed than I'm comfortable with just to get the features as I can't get a client player entity easily (and reliably) from where I'm calling.

commented

I've needed this myself too in places, but haven't gotten around to exposing it in the API, partly as I don't consider the EarsFeatures object to be API.

commented

One of the issues here is the Ears API is version-independent, and cannot directly refer to any Minecraft classes. I suppose I could expose lookups by UUID and String usernames?

commented

...But Ears features are associated with texture IDs, not player IDs/usernames. Sigh.

commented

Implemented as UUID/username lookup which is kept separate from the storage used by the native Ears renderer, as otherwise I was going to have a hell of a time figuring out how to abstract this across versions.

I'll release 1.4.5 once some other fixes are made.

commented

v1.4.5 is released, and the new API artifact is published to my Maven.

Out of curiosity, what are you using this for? The badge thing is very vague, and I'm unsure what about it needs to know what features are enabled.