Custom image from atlas object in text component
I would like to make custom emojis/emotes from a datapack. Right now I have every component working that I need for them to be functional, except displaying my own textures. I have never done anything with custom textures in data packs and have never done anything with atlases, so this is completely foreign.
The overall way this will be ran is with /trigger "emote name". From there I have it running a tellraw command to output an imitation of the player typing out a single emoji chat message using this command. Here is an example emote for lag/bad ping: " execute as @a[scores={lag=1..}] run tellraw @a {"text":"<","extra":[{"selector":"@s"},{"text":"> "},{"type":"object","atlas":"minecraft:gui","sprite":"icon/ping_unknown"}]} " And it works great! The only thing better would be intercepting chat messages and swapping out the text in-line.
Here is how I have implemented this so far **Textures: **"emotes/data/emotes/textures/emotes/dcolon.png" Atlases: "emotes/data/emotes/atlases/emotes.json" Emotes.json: " { "sources": [ { "type": "emotes:directory", "prefix": "", "source": "emotes" } ] } " Command Ran: " execute as @a[scores={D8=1..}] run tellraw @a {"text":"<","extra":[{"selector":"@s"},{"text":"> "},{"type":"object","atlas":"emotes:emotes","sprite":"dcolon"}]} "
Please let me know if I'm off, WAY off, or whether this is just something that isn't possible to do. Thanks!