Pack Developers Guide
RPF adds some additional parameters to item models so that pack creators can manipulate the delegation process
Note
These parameters will work as described below only with the rpf:v1 resolver! (as of version 1.x.x)
minecraft:select and minecraft:range_dispatch
Both models have a delegate parameter. Its default value is true. If set to false, the checking chain will break BEFORE checking child models, and this model will be rendered
json
{
"model": {
"type": "select",
"property": "component",
"components": "custom_name",
"delegate": false,
"cases" : [
{
"when": [...],
"model": {
"type" : ...
}
},
{...}
]
}
}minecraft:composite
The composite model checks all its models for delegation. How the composite model itself handles information about whether its children delegate or not can be configured with the delegate_strategy parameter. There are 3 delegation strategies in total:
one_do_delegate(default) - if one of the child models delegates - then the entire composite model delegatesone_cancle_delegate- if one of the child models delegates - then the entire composite model does NOT delegatenot_delegate- the entire model will NOT delegate under any circumstances
Some Non-obvious Behaviors
- If the
conditionalmodel is root, then itson_falsemodel will be considered afallback - The
emptymodel never delegates - The
modelmodel will delegate if:- the model is a
fallback - the namespace of the model reference and the namespace of the item model identifier from the
item_modelcomponent are equal (This means that in vanilla game you shouldn't store models inminecraft:namespace in your packs) - the path of the model reference contains the path of the item model identifier from the
item_modelcomponent
- the model is a
