LiteLDev / LegacyScriptEngine

A plugin engine for running LLSE plugins on LeviLamina
https://lse.liteldev.com/
GNU General Public License v3.0
43 stars 8 forks source link

[Bug]: js nodejs NBT.parseSNBT()无法正常使用 #102

Closed BlueBoxMirror closed 5 months ago

BlueBoxMirror commented 5 months ago

Describe the bug

无论何种格式的SNBT输入,输出只有两种结果 NbtCompound({}) 或 null

To Reproduce

输入 log(NBT.parseSNBT('{"data":"hello"}').getData("data")) 输出 INFO [] 输入 log(NBT.parseSNBT('{data:hello}').getData("data")) 输出 INFO []

Expected behavior

输入 log(NBT.parseSNBT('{"data":"hello"}').getData("data")) 应输出 INFO [] hello 输入 log(NBT.parseSNBT(new NbtCompound({data:"hello"}).toSNBT()).getData("data")) 应输出 INFO [] hello

Screenshots

image image

Platform

Windows 11

BDS Version

1.20.73.01

LeviLamina Version

0.11.1+01b482c57

LegacyScriptEngine Version

0.6.1

Additional context

nbt工具插件 因SNBT格式的更改与 parseSNBT的bug而无法使用 建议使用原先的NBT.toSNBT() 与 NBT.parseSNBT()