SpyglassMC / vanilla-mcdoc

The vanilla definition files using the schema format, mcdoc, for describing data structures used by Minecraft, including its CODECs, JSONs, and NBTs
MIT License
18 stars 5 forks source link

Legacy numerical effect ids were an integer for a few versions #12

Closed snowlinouo closed 3 months ago

snowlinouo commented 1 year ago

有使用的 Minecraft 版本:1.19.2 和 1.19.4

Data 中的 ActiveEffects 會出現下圖中的錯誤 image

使用修正後會在 14 後面新增「b」,但實際在遊戲中使用該指令卻不需要 b,新增 b 會錯誤 下圖為自動修正後: image


實現步驟

先給自己藥水效果:

/effect give @s minecraft:invisibility 1000000 0 true

測試成功:

/execute if data entity @s ActiveEffects[{Id:14}]

image

測試失敗:

/execute if data entity @s ActiveEffects[{Id:14b}]

image

MulverineX commented 3 months ago

This fix will be available in v4 of the extension