▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Моды/Text Effects
Text Effects

Text Effects

Wonky text effects integrated into vanilla components

Оцените первым
863
7

!Text Effects


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

    ... and more

Usage

Add Dependency

build.gradle.kts:

repositories {
  // ...
  maven("https://maven.axolotlclient.com/releases")
}

dependencies {
  // ...
  
  // use modImplementation for versions <26.1 if on fabric
  implementation("io.github.moehreag:text-effects:<VERSION>")
}

Apply Effects

// A few other pre-made effects are available in the `TextEffects` class.
// Usage may differ slightly depending on game version.
var text = Component.literal("This is a text with effect!").withStyle(Style.EMPTY.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#combine.

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, you will need to change it accordingly for minecraft versions using json components instead of snbt.

This format can also be used in commands, for example /tellraw.

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

26.2.x26.1.x1.21.x1.20.x1.19.x1.18.x1.17.x1.16.x1.15.x1.14.x1.13.x1.12.x1.11.x1.10.x1.9.x1.8.x1.7.x

Платформы

Поддерживаемые окружения

Клиент и сервер

Ссылки


Создатели

Детали

Лицензия:
Опубликован:2 месяца назад
Обновлён:3 недели назад
Главная