Text Effects 图标

Text Effects

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 0.0.4+26.2-neoforge
本资源为搬运资源,原资源地址: https://modrinth.com/mod/text-effects
资源信息

Minecraft 版本: 26.2

平台: neoforge

标签: library

资源介绍

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.

下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
MCC Fishing Messages Mod

价格:0 墨喵币
下载量:0

查看详情
Danger Alert

价格:0 墨喵币
下载量:0

查看详情
Final Netherite

价格:0 墨喵币
下载量:0

查看详情
Sharpened Axes

价格:0 墨喵币
下载量:0

查看详情