nameOfNbtCompoundTagKeys - SpyglassMC/Spyglass GitHub Wiki

Rule Details

⚠️ Diagnostic: this is a diagnostic rule used by the diagnostic feature.

Enforce a consistent NBT compound key naming convention.

  • ("camelCase")
  • ("PascalCase")
  • ("snake_case")
  • ("SCREAMING_SNAKE_CASE")
  • ("kebab-case")

Examples

Default

{
    "nameOfNbtCompoundTagKeys": null
}

👍 Good

give @s minecraft:stone{fooByte: 1b}
give @s minecraft:stone{FooByte: 1b}
give @s minecraft:stone{foo_byte: 1b}
give @s minecraft:stone{FOO_BYTE: 1b}
give @s minecraft:stone{foo-byte: 1b}

Camel Case

{
    "nameOfNbtCompoundTagKeys": ["warning", "camelCase"]
}

👍 Good

give @s minecraft:stone{fooByte: 1b}

👎 Bad

give @s minecraft:stone{FooByte: 1b}
give @s minecraft:stone{foo_byte: 1b}
give @s minecraft:stone{FOO_BYTE: 1b}
give @s minecraft:stone{foo-byte: 1b}

History

This rule was introduced in DHP 2.0.0.

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