Multi-Part Models

Multi-part models are models featuring a multi-part information within the blockstate file for that block. Multi-part blockstates can be used to specify separate block models for different states, but the main use is to reduce the amount and size of files by having the ability to add block models together. The main blocks that will use a multi-part blockstate file are:

Fences, walls, glass panes, iron bars, the brewing stand, redstone wire, chorus plants and fire.

Multi-part models work by instead of replacing a model depending on a certain blockstate but instead adding the models together. There are several ways to define a blockstate:

Note all multi-part models must be defined in { “multipart”: [ blockstates go here ] }

{ “multipart”: [
{ “apply”: { “model”: “block model” } }
] }

Applying a model without defining a blockstate will always display the model no matter the blockstate of the block.

{ “multipart”: [
{ “when”: { “north”: “true” },
“apply”: [
{ “model”: “my_model” },
{ “model”: “alt_model” },
{ “model”: “another_alt” }
]
}
]}

If you set more than one model to be applied when a condition is met one of the models will be applied randomly, when you set multiple models per condition they must be within square brackets – [ ].

{ “multipart”: [
{ “when”: { “north”: “true” },
“apply”: { “model”: “my_model” } }
] }

You can define two or more states which all must be met for the model to be applied:
{ “when”: { “north”: “true”, “east”: “true” },
“apply”: { “model”: “my_model” } },

This example above shows a model which will be added to the block when a block that it can connect to is to the north of the block and a second which will display the model only if there is a block that the block can connect to the north and to the east.

{ “multipart”: [
{ “when”: { “OR”: [
{“north”: “true”, “east”: “true” },
{“south”: “true”, “east”: “true” },
{“north”: “true”, “west”: “true” },
{“south”: “true”, “west”: “true” }
] },
“apply”: { “model”: “my_model” } }
] }

Using “OR” will allow the same model to be applied when either one of the states listed within the square brackets are met.

{ “when”: { “north”: “true|false” },
“apply”: { “model”: “my_model” } },

The vertical line “|” is used as a smaller “or” statement and can only be used when specifying the value of a blockstate. The above example a model will be applied when the north blockstate is true OR false.
Notes in this situation simply putting [ { “apply” : { “model”: “my_model” } }, … will work the same
The vertical line can be entered by holding shift and entering a backslash “\”, or by holding alt and entering 124 on the numpad.

Specific states this is a list of all states for each block capable of multi-part model:

Glass panes, iron bars, and fences all have north, east, south, and west as available blockstates all of which can be set to true” or false”.

Walls have north, east, south, west, and up as states which can be tested for, all of which can be set to true” or false”.

Be aware walls are hard-coded to have their up blockstate true” under a lot more situations than just having a block above it.

I have used mossy cobble walls to show where the “up” blockstate is set to true”.
When a wall has 3 or 4 connections, no connections, only one connection or even when a wall is connected by 2 walls at 90º ie north and west, all pictured above.

The brewing stand has 3 blockstates has_bottle_0, has_bottle_1, has_bottle_2, which all can be either true or false.

Redstone wire has 4 blockstates north, east, south, and west which can be set to “none”, “side” or “up”, where “none” is when there isn’t any redstone equipment there, where “side” is when there is redstone equipment on the same level, and “up” is when there is some redstone on the block above and to the side.

redstone_blockstates
“none”, “side”, and “up”

Chorus plants have 6 blockstates north, east, south, west, up and down which can be set to “true” or “false”. These blockstates apply to which side of the block either a chorus plant or chorus flower is, down will be set to true when there is end stone below the chorus plant.

Fire has 5 blockstates north, east, south, west and up which can be set to “true” or “false”. These apply for which direction the block is to the fire, on which the fire is attached to.