Skip to content

Repository files navigation

WaveMotes-Server

The server side of the WaveMotes emote system: the tooling that makes custom emotes show up for everyone on your Minecraft network, even vanilla players with no mod, and bridge to and from Discord.

WaveMotes (the client mod) renders emotes for the player who has it. This side makes them work for the whole server.

How the pieces fit

Discord guild emojis ──build_pack.py──────► resource pack (PUA font)  ──► every client draws the emote
                     ├─emote_map.json───────► Styled Chat (:name: in-game) ──► everyone sees it, no mod
                     └─emote_publisher.py──► manifest.json + PNGs ──► WaveMotes mod live-syncs new emotes
ChatBridge (Discord bot) ───────────────────► :name: <-> <:name:id> across servers and Discord
  1. build_pack.py pulls your guild's custom emojis and builds a resource pack whose font maps a private-use codepoint to each emote. Set it as the server resource-pack; clients draw the glyphs. This is what makes vanilla players (no mod) see the emotes.
  2. inject_emoticons.py feeds the same emotes into Styled Chat so typing :name: in-game turns into the emote for everyone.
  3. ChatBridge (the Discord bot) carries the emotes between Minecraft and Discord, and across servers on the network, rewriting :name: to <:name:id> and back. That is the cross-server / Discord link.

Run the same emote set on every server + the bridge, and a :tet: typed anywhere shows up everywhere, in-game and in Discord.

Setup

cp config.example.json config.json     # fill in guild_id + a bot token in that guild
python build_pack.py                   # -> out/MineWaveEmotes.zip + out/SHA1 + out/emote_map.json

Host out/MineWaveEmotes.zip somewhere your players can download, then in each server's server.properties:

resource-pack=https://your.host/MineWaveEmotes.zip
resource-pack-sha1=<contents of out/SHA1>
require-resource-pack=true

For in-game :name: (Fabric servers with Styled Chat):

python inject_emoticons.py /path/to/server/config/styled-chat.json out/emote_map.json
# then in-game:  styledchat reload

Updating emotes: re-run build_pack.py, re-host the zip (change the URL or purge your CDN cache, a versioned filename is easiest), update resource-pack-sha1, re-run inject_emoticons.py, reload Styled Chat.

Live emote sync (v2.0)

With the resource pack, adding an emote means re-hosting the pack and every client re-downloading it (and the pack prompt can annoy people). emote_publisher.py is the lighter path for players who run the WaveMotes mod (2.0+): new server emotes appear on their own, no mod update.

It keeps an append-only registry (emote_registry.json) keyed by Discord emoji id, so every emote gets a stable private-use codepoint that is never reassigned (renames keep it; removals retire it). From that it writes:

  • publish/manifest.json + the emote PNGs: what the mod fetches. The mod only downloads textures for codepoints it doesn't already embed, registers them through a resource pack it manages and reloads resources.
  • emote_map.json: the same file the ChatBridge bot reads for the Discord bridge, regenerated so new emotes bridge immediately.
cp config.example.json config.json     # guild_id + bot token + paths
python emote_publisher.py               # one-shot: writes publish/manifest.json + PNGs

Run it from cron, or call publish(cfg, emojis) from your bot's on_guild_emojis_update so it republishes the instant an emote changes (that is how the MineWave bot does it). Then mirror the publish/ dir to your web root with sync_pub_to_web.sh so the mod can reach https://<your-host>/emotes/manifest.json. Point the mod's manifestUrl at it.

Animated emojis publish as their first frame (Minecraft bitmap fonts don't animate). This path needs no resource-pack prompt: emotes are the mod's job.

Requirements & notes

  • A dedicated server or VPS with file/plugin access. Locked-down shared hosts (Shockbyte, Aternos, etc.) can't host the resource pack or run the bridge.
  • A Discord bot token that is a member of your guild (read emojis).
  • In-game :name: needs Styled Chat (Fabric server-side).
  • Discord <-> Minecraft needs ChatBridge.
  • The shipped example values point at MineWave; swap in your own guild and host.

Questions?

Ask in the W4VE Discord. It's quick, and you're welcome to dig into the code.

License

MIT. Part of CodeW4VE.

About

Server side of WaveMotes: resource-pack generator + Styled Chat injector so everyone (even vanilla) sees custom emotes, bridged to Discord across servers.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages