nbtTypeCheck - ChenCMD/datapack-helper-plus-JP GitHub Wiki

ルールの詳細

⚠️ Diagnostic: これは、校閲機能によって使用される校閲ルールです。

🔧 Fixable: これは、校閲機能によって使用される校閲ルールです。

NBTの値の型を確認します。

  • ("strictly"): NBT値のタイプは、正確に一致する必要があります。
  • ("loosely"): bytes、shorts、longs、floats、doublesは、NBT述部にない限り、整数として書き込むことができます。

Default

{
    "nbtTypeCheck": ["warning", "loosely"]
}

👍 良い例

summon minecraft:armor_stand ~ ~ ~ {Invisible: 1b}
summon minecraft:armor_stand ~ ~ ~ {Invisible: 1}
execute if entity @e[type=minecraft:armor_stand,nbt={Invisible: 1b}]

👎 悪い例

summon minecraft:armor_stand ~ ~ ~ {Invisible: "haha"}
execute if entity @e[type=minecraft:armor_stand,nbt={Invisible: 1}]

Strictly

{
    "nbtTypeCheck": ["warning", "strictly"]
}

👍 良い例

summon minecraft:armor_stand ~ ~ ~ {Invisible: 1b}
execute if entity @e[type=minecraft:armor_stand,nbt={Invisible: 1b}]

👎 悪い例

summon minecraft:armor_stand ~ ~ ~ {Invisible: "haha"}
summon minecraft:armor_stand ~ ~ ~ {Invisible: 1}
execute if entity @e[type=minecraft:armor_stand,nbt={Invisible: 1}]

無効化

{
    "nbtTypeCheck": null
}

👍 良い例

summon minecraft:armor_stand ~ ~ ~ {Invisible: "haha"}
summon minecraft:armor_stand ~ ~ ~ {Invisible: 1b}
summon minecraft:armor_stand ~ ~ ~ {Invisible: 1}
execute if entity @e[type=minecraft:armor_stand,nbt={Invisible: 1b}]
execute if entity @e[type=minecraft:armor_stand,nbt={Invisible: 1}]

History

Version Description
2.0.0 Firstly introduced this rule.
2.0.1 Change the default setting to loosely from strictly.
⚠️ **GitHub.com Fallback** ⚠️