A text rendering API with custom font and Caxton support
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 rainbow 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)
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 🍻
<rainbow><bold>Hello!</bold></rainbow><epic>, <legendary>, <spooky> (or create your own).assets/emberstextapi/font/./emberstextapi send and /emberstextapi test.Send a styled message from the server in a few lines:
List<TextSpan> spans = MarkupParser.parse(
"<neon><rainbow><bold>Welcome!</bold></rainbow></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 RainbowEffect(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));
| 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 |