# Highlight State

Highlight states are pretty similar to blockstates and are formatted in a similar manner for the json.

For highlight states we have a single object of <mark style="color:red;">`variants`</mark> which has key pair values with the key being the state of the block just like how you would format a blockstate and then the value either being a reference string to the highlight or an object formatted like such.

{% hint style="danger" %}
**Note:** Highlight states MUST be located in the same namespace as the namespace of the block it is being created for.

So for example for <mark style="color:red;">`minecraft:lectern`</mark> it must be located in <mark style="color:blue;">`assets/minecraft/resourcefullib/highlights/lectern.json`</mark> It can reference other namespace objects but must be in the same namespace as the namespace of the id.
{% endhint %}

{% tabs %}
{% tab title="Example" %}
This example uses the corner\_line highlight we created in the highlight section and creates 4 variants 2 where its a direct reference and 2 where it is a sub reference where on west and east it rotates the highlight by 90°.

{% code title="lectern.json" lineNumbers="true" %}

```json
{
    "variants": {
        "facing=south": "minecraft:corner_line",
        "facing=north": "minecraft:corner_line",
        "facing=west": {
            "highlight": "minecraft:corner_line",
            "rotation": { "y": 90 }
        },
        "facing=east": {
            "highlight": "minecraft:corner_line",
            "rotation": { "y": 90 }
        }
    }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}
