API for getting Ears features from a player
hibiii opened this issue ยท 5 comments
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.
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.
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?
...But Ears features are associated with texture IDs, not player IDs/usernames. Sigh.
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.