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

All properties are optional and have default values.

"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 :

Block appearanceItem appearanceSound (Ambient)Sound (Interaction)LightColorHardnessResistanceTool typeMining levelRequires toolShape

Default machine appearance

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

"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

Example 1
"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.

Example 2
"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.

Last updated