Compatibility
Minecraft: Java Edition
Platforms
Supported environments
Tags
Creators
Details

This library adds text effects which can be used by servers and mods to add unique effects to component-based text.
Integrated effects:
- Wobble
- Shake
- Marquee
Usage
Add Dependency
build.gradle.kts:
repositories {
// ...
maven("https://maven.axolotlclient.com/releases")
}
dependencies {
// ...
implementation("io.github.moehreag:text-effects:<VERSION>")
}
Apply Effects
// A few other pre-made effects are available in the `TextEffects` class
var text = Component.literal("This is a text with effect!").text_effects$withEffect(TextEffects.WOBBLE);
Create your own effects
A few factory methods for common operations are provided in the TextEffect class.
Some pre-made effects are provided in the TextEffects class, with a few additional helper methods as well as registration handling. If you'd like to build on top of another effect you can use TextEffect#map. Currently, only glyph offsets are possible but further options may be added in the future.
public static TextEffect CUSTOM_EFFECT = TextEffects.register(Identifier.fromNamespaceAndPath("modid", "custom_effect"), TextEffect.constantYOffset(-2));
Effects are automatically able to be de/serialized in components using their id provided at registration.
{
text: "text with a nice effect",
text-effects: "text-effects:wobble"
}
This component works for 26.1, it may not for earlier minecraft versions.
This format can also be used in commands, for example /tellraw.


