Skip to content

blockStateEqualSpacing

SPGoding edited this page Apr 26, 2020 · 1 revision

Rule Details

🎨 Stylistic: this is a stylistic rule used by the formatting feature.

Enforce spacing around equal signs in block states.

  • (object) Root.
    • before: (number) the number of spaces before the equal sign.
    • after: (number) the number of spaces after the equal sign.

Examples

Default

{
    "blockStateEqualSpacing": { "before": 0, "after": 0 }
}

👍 Good

setblock ~ ~ ~ minecraft:stone_button[face=ceiling]

👎 Bad

setblock ~ ~ ~ minecraft:stone_button[face= ceiling]
setblock ~ ~ ~ minecraft:stone_button[face =ceiling]
setblock ~ ~ ~ minecraft:stone_button[face = ceiling]

Spacious

{
    "blockStateEqualSpacing": { "before": 1, "after": 1 }
}

👍 Good

setblock ~ ~ ~ minecraft:stone_button[face = ceiling]

👎 Bad

setblock ~ ~ ~ minecraft:stone_button[face=ceiling]
setblock ~ ~ ~ minecraft:stone_button[face= ceiling]
setblock ~ ~ ~ minecraft:stone_button[face =ceiling]

History

This rule was introduced in DHP 2.0.0.

Clone this wiki locally