Custom item model presets
As of version 5.0.0 you can add custom item model presets for the TARDIS exterior.
Custom model presets are defined in plugins/TARDIS/custom_models.yml:
# a list of the custom models you want to use
models:
# model name
Type 40:
# the item that is placed on the armour stand
item: CLAY_BALL
Bad Wolf:
item: WOLF_SPAWN_EGG
For TARDIS v6.x.x and Minecraft 1.21.4+
The files for these examples are included in the TARDIS Resource Pack.
Model definitions
Custom preset models are defined in model definition files with specific suffixes:
State | Filename suffix | Use |
---|---|---|
door closed | _closed | Appearance |
door open | _open | Appearance |
transparent coloured | _stained | Materialisation |
transparent clear | _glass | Materialisation |
camera | _camera | External camera |
Using the suffixes above, the Bad Wolf preset files would be named:
bad_wolf_closed.json
bad_wolf_open.json
bad_wolf_stained.json
bad_wolf_glass.json
bad_wolf_camera.json
These files are located in the assets/tardis/items
folder.
The model definition in these files then points to the actual item model found somewhere in assets/tardis/models/item/
, for example:
{
"model": {
"type": "minecraft:model",
"model": "tardis:item/police_box/bad_wolf_closed"
}
}
Once set up this way and the resource pack reloaded, you can use the minecraft:give
command to test the models are working:
/give @s wolf_spawn_egg[item_model="tardis:bad_wolf_open"]
Or alternatively, use the resource pack debug preview feature.
Prior to TARDIS v6.x.x
Custom model data values
The plugin uses standardised values for each state of the TARDIS visuals - open/closed door + 2 stages of materialisation (coloured/clear). You must use these values when setting up your resource pack entries! See the examples below (these are also included in the TARDIS-Resource-Pack, and as comments in custom_models.yml).
State | Custom model data |
---|---|
door closed | 1001 |
door open | 1002 |
transparent coloured | 1003 |
transparent clear | 1004 |
Example model overrides
This would go in assets/minecraft/models/item/clay_ball.json:
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "minecraft:item/clay_ball"
},
"overrides": [
{"predicate": {"custom_model_data": 1001}, "model": "tardis:block/police_box/type_40_closed"},
{"predicate": {"custom_model_data": 1002}, "model": "tardis:block/police_box/type_40_open"},
{"predicate": {"custom_model_data": 1003}, "model": "tardis:block/police_box/type_40_stained"},
{"predicate": {"custom_model_data": 1004}, "model": "tardis:block/police_box/type_40_glass"}
]
}
This would go in assets/minecraft/models/item/wolf_spawn_egg.json:
{
"parent": "minecraft:item/template_spawn_egg",
"overrides": [
{"predicate": {"custom_model_data": 1001}, "model": "tardis:block/police_box/bad_wolf_closed"},
{"predicate": {"custom_model_data": 1002}, "model": "tardis:block/police_box/bad_wolf_open"},
{"predicate": {"custom_model_data": 1003}, "model": "tardis:block/police_box/bad_wolf_stained"},
{"predicate": {"custom_model_data": 1004}, "model": "tardis:block/police_box/bad_wolf_glass"}
]
}