Warning: file_put_contents(/www/wwwroot/nmbt.106988770/cache/modrinth_versions_90cn5fNC.json): Failed to open stream: Permission denied in /www/wwwroot/nmbt.106988770/resource_detail.php on line 53
Neilon (Text Library) - 墨喵 Minecraft 资源

Neilon (Text Library)

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.1.2
本资源为搬运资源,原资源地址: https://modrinth.com/mod/neilon
资源信息

Minecraft 版本: 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11

平台: fabric

标签: library

资源介绍

Neilon

Neilon is a Fabric text library to aid in working with Minecraft text.

Featureset

  • Literal text
  • Translation text
  • Keybinding text
  • Basic text styling (bold, italic, underlined, strikethrough, magic)
  • Colors
  • Click actions
    • Command running
    • Command suggestions
    • Opening URLs
    • Copy to clipboard
  • Hover events
    • Text
    • Item
    • Entity
  • QOL text methods
    • Repeat
    • Keybinding
    • Translation
    • Color
  • QOL features
    • Automatic command click fixer, no longer requiring / in front
    • Automatic URL fixer, no longer requiring https:// in front

Planned

  • Gradients

Usage

See the wiki,
or directly contribute to our wiki

Update policy

Unless we see high demand, or we need it ourselves, we will follow the latest Minecraft version by looking
at Create Fabric, as this mod is used primarily for
the SnackBag Create mod server.

We try our best to not introduce breaking changes unless truly necessary. Methods will rather be marked as deprecated

Code example

NText.assemble()
    .text("[Epic Button]")
    .color(Color.RED)
    .hover("What will this do?")
    .click(ClickType.RUN, "kill @s")

    .text(" ")

    .text("[Another Button]")
    .color(Color.GREEN)
    .hover(NText.of("I suspect this won't be any better.", Color.GREEN))
    .click(ClickType.COPY, "i like trains")

    .build();

For reference, this is how it would look like when using vanilla code

Text.literal("[Epic Button]")
    .styled(style -> style
        .withColor(Formatting.RED)
        .withHoverEvent(new HoverEvent(
            HoverEvent.Action.SHOW_TEXT,
            Text.literal("What will this do?")
        ))
        .withClickEvent(new ClickEvent(
            ClickEvent.Action.RUN_COMMAND,
            "kill @s"
        ))
    )

    .append(" ")

    .append(Text.literal("[Another Button]")
        .styled(style -> style
            .withColor(Formatting.GREEN)
            .withHoverEvent(new HoverEvent(
                HoverEvent.Action.SHOW_TEXT,
                Text.literal("I suspect this won't be any better.")
                    .styled(s -> s.withColor(Formatting.GREEN))
            ))
            .withClickEvent(new ClickEvent(
                ClickEvent.Action.COPY_TO_CLIPBOARD,
                "i like trains"
            ))
        )
    );
下载与版本
评论(0)
请 登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

赞助作者

请 登录 后赞助作者。

🔥 相关推荐
Beyond The Bedrock

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

查看详情
Photon Optimization

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

查看详情
SpeedyMC3

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

查看详情
Cobalt Core

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

查看详情