MCA Reborn [Fabric/Forge]

MCA Reborn [Fabric/Forge]

6M Downloads

Small Chat Heads incompatibility

Fourmisain opened this issue ยท 2 comments

commented

When using Chat Heads, some villager messages get the player's chat head, for example:

receiver_uuid

Fix is extremely simple:

receiver.sendSystemMessage(new LiteralText(Config.getInstance().villagerChatPrefix).append(asEntity().getDisplayName()).append(": ").append(message), receiver.getUuid());

Instead of using receiver.getUuid() as the sender UUID, Util.NIL_UUID should be used.

(Btw, the reason why the other messages don't get a chat head is because they were sent using player.sendMessage(), which internally uses Util.NIL_UUID.)

commented

P.S.
Technically it'd be even better if the Villager's UUID would be used as the sender's UUID.
Chat Heads could then theoretically match the entity and show the Villager head in chat - but I can't expect you to rewrite your chat system just for a theoretical possibility.
(Also I'm not sure if the sender UUID is even allowed to be from a non-player.)

commented

Yes, that's definitely a typo, thanks :)
It works from non players.