dzwdz / chat_heads

Mozilla Public License 2.0
59 stars 34 forks source link

Feature request: Render at placeholder #115

Open dimaguy opened 1 month ago

dimaguy commented 1 month ago

Chat Heads renders heads way better than server chat heads, and I'd like to have it render on placeholder (as well as adding rendering custom heads for system and bridged messages, but that's off-topic), so I have more freedom to select where the head shows up in a message (especially system messages), would this be possible?

Fourmisain commented 1 month ago

You mean rendering the head at a position specified by the server? That's certainly possible, but as always this is a question of compatibility. Lots of servers use resource packs with custom fonts that make use of code points from Unicode's Private Use Area to add new symbols or even single pixels (that's e.g. how server heads work). If Chat Heads starts using those code points as well, they might clash.

I guess we could just choose one, like U+F8FF, and wait for the reports to pour in. Alternatively the server could provide a resource pack with a assets/chat_heads/use_placeholder resource or similar containing the single code point to be used. (Just like there's already support for a assets/chat_heads/disable resource to disable the mod on server request.)

Then there's also the question of... how should the config look like? Currently there's only the "Before Name" and "Before Line" rendering. This feature basically wants to override "Before Name", but it shouldn't replace it (that would take away the user's freedom). So maybe it needs a "At Placeholder / Before Name" setting as a new default? (This will looks ugly as sin in the UI, but I guess that's a price I'm willing to pay.)

dimaguy commented 1 month ago

Im thinking that usually the server knows better than the client how to display it's own chat for uniformity's sake, but the client can always get an extra setting to ignore the custom plugin message packet/resource pack that the server sends.

This feature is usually better used in walled garden modpacks for example, where player choice isnt always the best choice

dimaguy commented 1 month ago

Also Id like to add, it'd be nice if I could specify the player name whose head I'm trying to display at that place