
Embers Text API
Use fancy text effects anywhere, including custom fonts!
Embers Text API is a library mod that gives your mod full control over animated, styled text overlays. Display rich on-screen messages with effects like ✨ gradients, neon glows, typewriter reveals, glitch distortion, and more- all composable and stackable.
Docs: https://tysontheember.dev/embers-text-api/intro/
Note: As of v2 Caxton is no longer compatable as it replaces the vanilla text renderer, you can still use custom fonts just not OTF fonts(use TTF fonts)
Why Does This Exist?
Immersive Messaging API (which this replaces) depends on txnilib, which jar-in-jars Forgified Fabric API, meaning every Forge mod using it carries Fabric overhead. On top of that, it lacked features and fixes I needed: composable effect stacking, animated gradients, multiple simultaneous animations, and a flexible markup system. So this happened. Cheers 🍻
Features
- 18 Built-In Effects: ✨, gradient, pulse, wave, shake, bounce, glitch, neon glow, typewriter, obfuscation, and more.
- Composable Effect Stacking: Layer as many effects as you want on the same text. Each one modifies the previous result.
- Markup Language: Style text declaratively with XML-style tags:
<✨><bold>Hello!</bold></✨> - Preset System: Bundle effects into reusable JSON presets and use them as tags:
<epic>,<legendary>,<spooky>(or create your own). - Inline Items & Entities: Render item icons and entity models directly within text.
- Backgrounds: Solid, gradient, or bordered backgrounds behind messages.
- Custom Fonts: Ship your own bitmap fonts under
assets/emberstextapi/font/. - Flexible Positioning: Anchors, alignment, offsets, scaling, fade-in/fade-out.
- Commands: Test and prototype with
/emberstextapi sendand/emberstextapi test.
Developer Integration
Send a styled message from the server in a few lines:
List<TextSpan> spans = MarkupParser.parse(
"<neon><✨><bold>Welcome!</bold></✨></neon> " +
"<color value=#AAAAAA>Enjoy your stay.</color>"
);
ImmersiveMessage msg = new ImmersiveMessage(spans, 200f);
msg.setAnchor(TextAnchor.CENTER_CENTER);
msg.fadeIn(30);
msg.fadeOut(30);
EmbersTextAPI.sendMessage(player, msg);
Or build spans programmatically:
TextSpan header = new TextSpan("BOSS DEFEATED")
.color(0xFFD700)
.bold(true)
.addEffect(new ✨Effect(new TypedParams()));
ImmersiveMessage msg = new ImmersiveMessage(List.of(header), 150f);
EmbersTextAPI.sendMessage(player, msg);
Register your own effects:
EffectRegistry.register("myeffect", params -> new MyCustomEffect(params));
Commands
| Command | Description |
|---|---|
/emberstextapi send <player> <duration> <text> | Send a simple message |
/emberstextapi sendcustom <player> <nbt> <duration> <text> | Full NBT-driven customization |
/emberstextapi test <id> | Play a built-in demo message |
For Pack Devs
- This is a Library mod it does nothing in gameplay on its own, but the command system lets you test effects and run them in game.
- Safe to include in any pack.
- Great for quest descriptions, tips, or any stylish text.
- This mod can be used with KubeJS and datapacks!