Block appearance
Customize the appearance of the machine block.
Machine block appearance is defined using the block
property inside the appearance
property.
This property is optional and will use the default machine model if not specified.
There is 2 way of using this property :
Using a blockstate
The block
property can take a blockstate using the format : namespace:block_id[state1=value,state2=value...]
The blockstates properties are optional, you can just use namespace:block_id
and the machine will use that block default state.
You don't have to use all the block's state properties, if some are not specified their default value will be used instead.
Example :
That way the machine will use the appearance of a vanilla lit furnace.
Using a custom model
If you don't want to mimic an existing block you can use the block property to point a custom model that the machine will use.
The model must be a Minecraft type json model, if you are not familiar with this type of model see the official MC Wiki (note : you need only the model and texture file but not the blockstates file)
The model MUST be loaded in-game using either a ResourcePack or a Resource Loader mod like Open Loader.
The model MUST be located in assets/namespace/models/machine
any other model location such as assets/namespace/models/block will not work.
Example : A model located in assets/namespace/models/machine/my_machine.json
must be defined as namespace:machine/my_machine
, the model loader will search for files in the models folder and it's subfolders and will also add the .json so you don't have to.
Example :
That way the machine will use the file located in assets/custommachinery/models/machine/my_model.json
as the machine model.
Adding a new custom model inside that directory will require a game restart
Notes
If you use a custom minecraft json model for your machine you can color some faces using the tintIndex
property (inside the json model).
Available tintIndex
values are:
1 : color the face using the biome water color
2 : color the face using the biome grass color
3 : color the face using the biome foliage color
4 : color the face using the Machine Appearance color property value
If you don't specify a tintIndex in the json model the face will use it's texture and not color it.