-
Notifications
You must be signed in to change notification settings - Fork 10
Block Model Modifiers
Block model modifiers are a new concept added by Fusion. Currently, block model modifiers allow using appending additional models onto a block. Below is an explanation of how to use block model modifiers.
Similar to item model modifiers and most resource pack features, block model modifiers also use json files. The files should be located at assets/<namespace>/fusion/model_modifiers/blocks/. The name of the file is not significant.
Each block model modifier file can target a number of block and specific block states specified under the targets key.
The append key then specifies an array of model locations for which the corresponding model will be added to the targeted blocks.
Here is an example of a model modifier targeting the torch block and the lit state of the redstone torch block which adds the block/torch_base model to their existing models:
{
"targets": [
"torch",
{
"block": "redstone_torch",
"properties": {
"lit": "true"
}
}
],
"append": [
"block/torch_base"
]
}The main purpose of block model modifiers is to make block overlays (transitions from one block to another) easier.
When placing glass panes on top of each other, the top and bottom faces are not culled. This may become apparent when using connecting textures for glass panes.
The pane_culling_fix option in block model modifiers will ensure that the top and bottom quads of glass panes are culled whenever another glass pane is placed above or below.
A block model modifier for regular glass panes with the pane_culling_fix option would look as follows:
{
"targets": [
"glass_pane"
],
"pane_culling_fix": true
}When overlaying multiple quads, it may result in stacked breaking overlay textures which amplifies the transparent parts of the breaking overlay. To avoid this, the show_breaking_overlay option can be used to only apply the breaking overlay to the original model and not any appended models.
A block model modifier which disables the breaking overlay for appended models would look as follows:
{
"targets": [
"diamond_ore"
],
"append": [
"block/diamond_overlay"
],
"show_breaking_overlay": false
}