-
Notifications
You must be signed in to change notification settings - Fork 107
Fallback Model
KnightMiner edited this page Jul 24, 2020
·
2 revisions
This page details the Mantle fallback model loader, registered as mantle:fallback
.
The fallback model loader is used to load the first model with a valid loader from a list. The first model with a loaded mod ID will be used. Mod ID will either be the key fallback_mod_id
, or the namespace from loader
. If neither is set, model always loads.
-
Object: Base object
-
models
(array): Array of model objects options-
A model (object): A single model object.
-
loader
(string): Model loader name (optional). If unset, uses vanilla model loader. -
fallback_mod_id
(string): Required mod ID to use this model. If unset, defaults to the namespace fromloader
. Ifloader
is unset, model always loads. - All keys from the relevant loader
-
-
A model (object): A single model object.
-
The following JSON produces a connected model if Tinkers Construct is loaded, and a vanilla model otherwise. Note that if fallback_mod_id
was not specified, the dependency for the first model would be Mantle.
{
"loader": "mantle:fallback",
"models": [
{
"fallback_mod_id": "tconstruct",
"loader": "mantle:connected",
"parent": "block/cube_all",
"textures": {
"all": "block/glass"
},
"connection": {
"textures": { "all": "cornerless_full" }
}
},
{
"parent": "block/cube_all",
"textures": {
"all": "block/glass"
}
}
]
}