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

ルールの詳細

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

🔧 Fixable: このルール違反はコードアクションによって修正可能です。

名前空間のデフォルト名前空間を省略するかどうか。設定に関係なくnbtセレクター引数や、execute if data等の名前空間は常に保持される必要があります。

  • (boolean型)

Default

{
    "idOmitDefaultNamespace": null
}

👍 良い例

summon armor_stand ~ ~ ~ {ArmorItems: [{Count: 1b, id: "stone"}, {}]}
summon minecraft:armor_stand ~ ~ ~ {ArmorItems: [{Count: 1b, id: "minecraft:stone"}, {}]}
kill @e[type=armor_stand,nbt={ArmorItems: [{Count: 1b, id: "minecraft:stone"}, {}]}]
kill @e[type=minecraft:armor_stand,nbt={ArmorItems: [{Count: 1b, id: "minecraft:stone"}, {}]}]

👎 悪い例

kill @e[nbt={ArmorItems: [{Count: 1b, id: "stone"}, {}]}]

True

{
    "idOmitDefaultNamespace": ["warning", true]
}

👍 良い例

summon armor_stand ~ ~ ~ {ArmorItems: [{Count: 1b, id: "stone"}, {}]}
kill @e[type=armor_stand,nbt={ArmorItems: [{Count: 1b, id: "minecraft:stone"}, {}]}]

👎 悪い例

summon minecraft:armor_stand ~ ~ ~ {ArmorItems: [{Count: 1b, id: "minecraft:stone"}, {}]}
kill @e[type=minecraft:armor_stand,nbt={ArmorItems: [{Count: 1b, id: "minecraft:stone"}, {}]}]
kill @e[type=armor_stand,nbt={ArmorItems: [{Count: 1b, id: "stone"}, {}]}]

False

{
    "idOmitDefaultNamespace": ["warning", false]
}

👍 良い例

summon minecraft:armor_stand ~ ~ ~ {ArmorItems: [{Count: 1b, id: "minecraft:stone"}, {}]}
kill @e[type=minecraft:armor_stand,nbt={ArmorItems: [{Count: 1b, id: "minecraft:stone"}, {}]}]

👎 悪い例

summon armor_stand ~ ~ ~ {ArmorItems: [{Count: 1b, id: "stone"}, {}]}
kill @e[type=armor_stand,nbt={ArmorItems: [{Count: 1b, id: "stone"}, {}]}]

History

このルールはDHP 2.0.0で実装されました。

⚠️ **GitHub.com Fallback** ⚠️