ποΈ Model Generation
This page mainly explains how to use model generation.
Introduction
ποΈ Model Generation is acting a role to create a model in YAML format.
When configuring multiple similar models (e.g., 16 wool-colored sofas that only differ in textures), you would normally need to create an equal number of separate models. However, with Model Generation, you can easily manage these model inheritance relationships using YAML format.
The path specified in the path
option (located in the same configuration section as generation
) must point to a non-existent model path! Otherwise, it will conflict with your existing models.
Model generation is always an optional configuration. If you already have a dedicated JSON model file for that block/item, you do not need to use generation
βsimply specify the model path using path
instead.
Where to Configure
If you observe carefully, you'll notice that the plugin uses the following configuration format in many places.
Arguments
parent
textures
If we intend to generate a block based on this model, the parameters for parent
and textures
should be specified as follows:
The key-value pairs under the textures
section are determined by the parent model.
For example:
minecraft:item/apple
inherits fromminecraft:item/generated
.layer0
is one of thetextures
parameters defined inminecraft:item/generated
.This is why you can override this texture in the child model (
apple
).
gui-light
Can be
"front"
or"side"
. If set to"side"
, the model is rendered like a block. If set to"front"
, model is shaded like a flat item. Defaults to"side"
.
display
Holds the different places where item models are displayed.
rotation: Specifies the rotation of the model according to the scheme
[x, y, z]
.translation: Specifies the position of the model according to the scheme
[x, y, z]
. If the value is greater than 80, it is displayed as 80. If the value is less than -80, it is displayed as -80.scale: Specifies the scale of the model according to the scheme
[x, y, z]
. If the value is greater than 4, it is displayed as 4.
Available values: thirdperson_righthand
, thirdperson_lefthand
, firstperson_righthand
, firstperson_lefthand
, gui
, head
, ground
, or fixed
.
Let's continue with this big big apple example. You may notice that when held in the right hand, its rotation behaves incorrectly. This happens because we overrode its parent model's display.firstperson_righthand
settings. Now, let's fix it!
Last updated