Skip to content

blockStateSortKeys

SPGoding edited this page Apr 26, 2020 · 1 revision

Rule Details

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

🔧 Fixable: violations of this rule can be fixed by Code Actions.

Enforce the values in a block state to be sorted by the keys.

  • ("alphabetically"): sorted alphabetically, case-insensitively.

Examples

Default

{
    "blockStateSortKeys": null
}

👍 Good

setblock ~ ~ ~ minecraft:stone_button[face=ceiling,powered=true]
setblock ~ ~ ~ minecraft:stone_button[powered=true,face=ceiling]

Alphabetically

{
    "blockStateSortKeys": ["warning", "alphabetically"]
}

👍 Good

setblock ~ ~ ~ minecraft:stone_button[face=ceiling,powered=true]

👎 Bad

setblock ~ ~ ~ minecraft:stone_button[powered=true,face=ceiling]

History

This rule was introduced in DHP 2.0.0.

Clone this wiki locally