Escapegoat 图标

Escapegoat

作者:rebot | 分类:模组

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

Minecraft 版本: 25w06a 25w07a 25w08a

平台: fabric

标签: library technology utility

资源介绍

Escapegoat

Escapegoat is a Fabric mod that adds various escape sequences to SNBT strings.
This mod was made because of the change made in snapshot 25w02a regarding text components in commands like tellraw, because they now use SNBT instead of JSON.
Because of this change, some functionality was lost, such as the ability to escape most characters.
This mod is there to fix that by adding the escape functionality to SNBT.
See the bug reports MC-279229 and MC-279250 for more information.

Escape sequences work both ways, for input and for output, though note that stringifying data only works with NBT.
This is something that is very likely to change in the future to make it independent of NBT, either by Mojang or by me in this mod, so please watch out for that.

Examples

  • /tellraw @a "Mi\necraft"
  • /tellraw @a {text: 'Abracadabra: \u{2728}', bold: true, color: "yellow"}
  • /item modify entity @s weapon {function: 'minecraft:set_writable_book_pages', pages: ['Line 1\nLine 2\nLine 3'], mode: 'replace_all'}

Escape Sequences

All escape sequences start with the \ character.

Simple escape sequences

  • \\: Backslash
  • \': Single quote (context-dependent, see below)
  • \": Double quote (context-dependent, see below)
  • \n: Line feed

Other common simple escape sequences are currently not allowed due to Minecraft not rendering them properly.

Escape sequences for surrounders are only allowed when used in a string with that surrounder.
This means that ' and " may be escaped depending on which one is used for a string that is surrounded by that character.
In other words: '\'' is valid, but '\"' is not, and vice versa, just like how it works in Minecraft already.

Complicated escape sequences

These complicated escape sequences can be used to represent any Unicode character.

  • \uXXXX: A fixed-length four-character hexadecimal UTF-16 character.
    The same as the one used in languages like JSON and JavaScript. \
    Examples:
    • \u004D (M)
    • \u2605 (★)
    • \uD83D\uDE0A (?)
  • \u{XXXXXX}: A variable-length hexadecimal UTF-32 character.
    The same as the one used in JavaScript. \
    Examples:
    • \u{4D} (M)
    • \u{2605} (★)
    • \u{1F60A} (?)
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
ForceXaeroFairPlay

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

查看详情
Supply Crates

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

查看详情
duolingo cpvp

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

查看详情
Animal Garden - Fennec Fox

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

查看详情