mirror of
https://github.com/haselkern/Minecraft-ArmorStand.git
synced 2025-12-03 06:24:07 +00:00
Text components do not need to wrapped as a JSON string
This commit is contained in:
parent
edc9abf002
commit
7bd46b4528
1 changed files with 6 additions and 0 deletions
|
|
@ -723,6 +723,12 @@ function generateCustomName() {
|
|||
if (nameObfuscated) {
|
||||
props.obfuscated = nameObfuscated;
|
||||
}
|
||||
|
||||
if (mcVersion >= MC_VERSION.v1_21_5) {
|
||||
// Since 1.21.5+, text components are no longer stored as JSON wrapped by a string.
|
||||
// So just return the props object instead
|
||||
return props
|
||||
}
|
||||
|
||||
let stringified = JSON.stringify(props);
|
||||
if (mcVersion < MC_VERSION.v1_14) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue