> For the complete documentation index, see [llms.txt](https://frinn.gitbook.io/custom-machinery-1.19/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://frinn.gitbook.io/custom-machinery-1.19/creating-custom-machines/machine-appearance.md).

# Machine Appearance

The machine appearance is what will define the in-game appearance (model/texture/sound/etc) of the machine block and item.

A machine appearance can be defined for each status of the machine : `idle`, `running`, `errored` and `paused` independantly.

### Json structure

{% hint style="info" %}
All properties are optional and have default values.
{% endhint %}

```json5
"appearance": {
    "property1": "defaultValue",
    "property2": 1,
    "idle": {
        "property1": "value",
        "property2": 42
    },
    "running": {
        "property1": "some_value",
        "property2": 23
    },
    "errored": {
        "property1": "another_value",
        "property2": 666
    },
    "paused": {
        "property1": "again_another_value",
        "property2": 56487
    }
}
```

* If a property is not specified for a status, the property defined directly inside the `appearance` block is used as default.
* Basically the properties defined for a specified machine status override the properties defined for the whole appearance, which themselves override the default values for this property.

### Properties

Machine appearance currently have 10 optional properties :

{% content-ref url="/pages/4Oss30bEoT9qRw2REUX5" %}
[Block appearance](/custom-machinery-1.19/creating-custom-machines/machine-appearance/block-appearance.md)
{% endcontent-ref %}

{% content-ref url="/pages/qAhLNNXZzLIHFyFyGBVl" %}
[Item appearance](/custom-machinery-1.19/creating-custom-machines/machine-appearance/item-appearance.md)
{% endcontent-ref %}

{% content-ref url="/pages/C7hhCgvGnA61DLfsbBK4" %}
[Sound (Ambient)](/custom-machinery-1.19/creating-custom-machines/machine-appearance/sound-ambient.md)
{% endcontent-ref %}

{% content-ref url="/pages/FBBjQySwHRZqVCSXpreY" %}
[Sound (Interaction)](/custom-machinery-1.19/creating-custom-machines/machine-appearance/sound-interaction.md)
{% endcontent-ref %}

{% content-ref url="/pages/7QIXn2uCZxGv0j27wDmy" %}
[Light](/custom-machinery-1.19/creating-custom-machines/machine-appearance/light.md)
{% endcontent-ref %}

{% content-ref url="/pages/CqxZ0tWCapf1v4Y3tfRx" %}
[Color](/custom-machinery-1.19/creating-custom-machines/machine-appearance/color.md)
{% endcontent-ref %}

{% content-ref url="/pages/NZMOBVfBkeLuyeO7s6L9" %}
[Hardness](/custom-machinery-1.19/creating-custom-machines/machine-appearance/hardness.md)
{% endcontent-ref %}

{% content-ref url="/pages/5jF2R6XPpWfXVVcCy1q4" %}
[Resistance](/custom-machinery-1.19/creating-custom-machines/machine-appearance/resistance.md)
{% endcontent-ref %}

{% content-ref url="/pages/xMATuxLn8UeRjsbki5LL" %}
[Tool type](/custom-machinery-1.19/creating-custom-machines/machine-appearance/tool-type.md)
{% endcontent-ref %}

{% content-ref url="/pages/nJX9pHO0OiWfVjNYKgUb" %}
[Mining level](/custom-machinery-1.19/creating-custom-machines/machine-appearance/mining-level.md)
{% endcontent-ref %}

{% content-ref url="/pages/BKk9GWVzvOW4fVbXjKnu" %}
[Requires tool](/custom-machinery-1.19/creating-custom-machines/machine-appearance/requires-tool.md)
{% endcontent-ref %}

{% content-ref url="/pages/qe3WYtsDNn5RodEJ0cVh" %}
[Shape](/custom-machinery-1.19/creating-custom-machines/machine-appearance/shape.md)
{% endcontent-ref %}

### Default machine appearance

This is what will be used by default for properties that are not specified :

```json5
"appearance": {
    "block": "custommachinery:block/custom_machine_block",
    "item": "custommachinery:block/custom_machine_block",
    "ambient_sound": "",
    "interaction_sound": "minecraft:iron_block",
    "light": 0,
    "color": 16777215,
    "hardness": 3.5,
    "resistance": 3.5,
    "tool_type": "minecraft:mineable/pickaxe",
    "mining_level": "minecraft:needs_iron_tool",
    "requires_tool": true,
    "shape": [[0, 0, 0, 1, 1, 1]]
}
```

### Examples

<details>

<summary>Example 1</summary>

```json5
"appearance": {
    "block": "minecraft:tnt",
    "sound": "minecraft:block.anvil.place",
    "light": 10
}
```

The machine with this machine appearance will have the appearance of a TNT block and when running it will make the sound of an anvil and emit a light level of 10.

</details>

<details>

<summary>Example 2</summary>

```json5
"appearance": {
    "block": "minecraft:furnace",
    "running": {
        "block": "minecraft:furnace[lit=true]",
        "light": 15
    }
}
```

This machine will have the appearance of an unlit furnace when idle, errored or paused, and the appearance of a lit furnace and emit light when running.

</details>
