{{See also|Tutorials/Models}}
{{exclusive|java}}
{{split|Model/Before 14w07a|Model/Before 14w25a|reason=These two iterations are quite different from the modern general format and should be covered accordingly (when they do get covered, that is)}}
'''Models''' are three-dimensional shapes used in ''Minecraft'' that are used to display objects encountered in the game.
The models pertaining to the vast majority of [[block]]s and [[item]]s can be configured, as well as those of a small selection of [[entities]]. Models are stored as [[JSON]] files in a [[resource pack]] in the assets/''
folder.
== Block models ==
"parent"
and "elements"
are set, the "elements"
tag overrides the "elements"
tag from the previous model.
*** Can be set to "builtin/generated"
to use a model that is created out of the specified icon. Only the first layer is supported, and rotation can be achieved only by using block states files.
** {{nbt|byte|ambientocclusion}}: Whether to use [http://en.wikipedia.org/wiki/Ambient_occlusion ambient occlusion] (true
- default), or not (false
).
** {{nbt|compound|display}}: Holds the different places where item models are displayed.
*** {{nbt|compound|''Position''}}: Named thirdperson_righthand
, thirdperson_lefthand
, firstperson_righthand
, firstperson_lefthand
, gui
, head
, ground
, or fixed
. Place where an item model is displayed. Holds its rotation, translation and scale for the specified situation. '''fixed''' refers to item frames, while the rest are as their name states. Translations are applied to the model before rotations.
**** {{nbt|list|rotation}}: Specifies the rotation of the model according to the scheme [x, y, z]
.
**** {{nbt|list|translation}}: Specifies the position of the model according to the scheme [x, y, z]
. The values are clamped between -80 and 80.
**** {{nbt|list|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.
** {{nbt|compound|textures}}: Holds the textures of the model, in form of a [[Tutorials/Models#File_path|resource location]] or can be another texture variable.
*** {{nbt|string|particle}}: What texture to load particles from. This texture is also used as an overlay if you are in a [[nether portal]], and used for [[water]] and [[lava]]'s still textures.{{bug|MC-240042}} This texture is also considered a texture variable that can be referenced as "#particle"
. Note: All breaking particles from non-model blocks are hard-coded, such as for [[Barrier|barriers]].
*** {{nbt|string|''Texture variable''}}: Defines a texture variable and assigns a texture.
** {{nbt|list|elements}}: Contains all the elements of the model. They can have only cubic forms. If both "parent"
and "elements"
are set, the "elements"
tag overrides the "elements"
tag from the previous model.
*** {{nbt|compound}} An element.
**** {{nbt|list|from}}: Start point of a cuboid according to the scheme [x, y, z]
. Values must be between -16 and 32.
**** {{nbt|list|to}}: Stop point of a cuboid according to the scheme [x, y, z]
. Values must be between -16 and 32.
**** {{nbt|compound|rotation}}: Defines the rotation of an element.
***** {{nbt|list|origin}}: Sets the center of the rotation according to the scheme [x, y, z]
.
***** {{nbt|string|axis}}: Specifies the direction of rotation, can be "x"
, "y"
or "z"
.
***** {{nbt|float|angle}}: Specifies the angle of rotation. Can be 45 through -45 degrees in 22.5 degree increments.
***** {{nbt|byte|rescale}}: Specifies whether or not to scale the faces across the whole block. Can be true or false. Defaults to false.
**** {{nbt|byte|shade}}: Defines if shadows are rendered (true
- default), not (false
).
**** {{nbt|int|light_emission}}: Defines the minimum light level that the element can receive. Can be 0-15, defaults to 0.
**** {{nbt|compound|faces}}: Holds all the faces of the cuboid. If a face is left out, it does not render.
***** {{nbt|compound|''Face''}}: Named down
, up
, north
, south
, west
or east
. Contains the properties of the specified face.
****** {{nbt|list|uv:}} Defines the area of the texture to use according to the scheme [x1, y1, x2, y2]
. The texture behavior is inconsistent if UV extends below 0 or above 16. If the numbers of x1
and x2
are swapped (e.g. from 0, 0, 16, 16
to 16, 0, 0, 16
), the texture flips. UV is optional, and if not supplied it automatically generates based on the element's position.
****** {{nbt|string|texture:}} Specifies the texture in form of the texture variable prepended with a #
.
****** {{nbt|string|cullface:}} Specifies whether a face does not need to be rendered when there is a block touching it in the specified position. The position can be: down
, up
, north
, south
, west
, or east
. It also determines the side of the block to use the light level from for lighting the face, and if unset, defaults to the side.
****** {{nbt|int|rotation}}: Rotates the texture clockwise by the specified number of degrees. Can be 0, 90, 180, or 270. Defaults to 0. Rotation does not affect which part of the texture is used. Instead, it amounts to permutation of the selected texture vertexes (selected implicitly, or explicitly though uv
).
****** {{nbt|int|tintindex}}: Determines whether to tint the texture using a hardcoded tint index. The default value, -1, indicates not to use the tint. Any other number is provided to BlockColors to get the tint value corresponding to that index. However, most blocks do not have a tint value defined (in which case white is used). Furthermore, no vanilla block currently uses multiple tint values, and thus the tint index value is ignored (as long as it is set to something other than -1); it could be used for modded blocks that need multiple distinct tint values in the same block though.
"parent"
and "elements"
are set, the "elements"
tag overrides the "elements"
tag from the previous model.
*** Can be set to "item/generated"
to use a model that is created out of the specified icon.
*** Can be set to "builtin/entity"
to load a model from an entity file. As you cannot specify the entity, this does not work for all items (only for [[chest]]s, [[ender chest]]s, [[mob head]]s, [[shield]]s, [[banner]]s and [[trident]]s).
** {{nbt|compound|display}}: Holds the different places where item models are displayed.
*** {{nbt|compound|''Position''}}: Named thirdperson_righthand
, thirdperson_lefthand
, firstperson_righthand
, firstperson_lefthand
, gui
, head
, ground
, or fixed
. Place where an item model is displayed. Holds its rotation, translation and scale for the specified situation. '''fixed''' refers to item frames, while the rest are as their name states. Translations are applied to the model before rotations. If this is specified but not all of translation, rotation and scale are in it, the others aren't inherited from the parent.
**** {{nbt|list|rotation}}: Specifies the rotation of the model according to the scheme [x, y, z]
.
**** {{nbt|list|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.
**** {{nbt|list|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.
** {{nbt|compound|textures}}: Holds the textures of the model, in form of a [[Tutorials/Models#File_path|resource location]] or can be another texture variable.
*** {{nbt|string|layer''N''}}: Used only to specify the icon of the item used in the inventory. There can be more than just one layer (e.g. for [[spawn egg]]s), but the amount of possible layers is hardcoded for each item. Works only in combination with "item/generated"
.
*** {{nbt|string|particle}}: What texture to load particles from. Used to determine the "crumb" particles generated by food items, as well as to determine the [[barrier]] particle (but it always uses items/barrier.png
as blockbreaking particle), which otherwise uses "layer0".
*** {{nbt|string|''Texture variable''}}: Defines a texture variable and assigns a texture.
** {{nbt|string|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"
.
** {{nbt|list|elements}}: Contains all the elements of the model. They can have only cubic forms. If both "parent"
and "elements"
are set, the "elements"
list overrides the "elements"
list from the parent model.
*** {{nbt|compound}} An element.
**** {{nbt|list|from}}: Start point of a cuboid according to the scheme [x, y, z]
. Values must be between -16 and 32.
**** {{nbt|list|to}}: Stop point of a cuboid according to the scheme [x, y, z]
. Values must be between -16 and 32.
**** {{nbt|compound|rotation}}: Defines the rotation of an element.
***** {{nbt|list|origin}}: Sets the center of the rotation according to the scheme [x, y, z]
.
***** {{nbt|string|axis}}: Specifies the direction of rotation, can be "x"
, "y"
or "z"
.
***** {{nbt|float|angle}}: Specifies the angle of rotation. Can be 45 through -45 degrees in 22.5 degree increments.
***** {{nbt|byte|rescale}}: Specifies whether or not to scale the faces across the whole block. Can be true or false. Defaults to false.
**** {{nbt|byte|shade}}: Defines if shadows are rendered (true
- default) or not (false
).
**** {{nbt|int|light_emission}}: Defines the minimum light level that the element can receive. Can be 0-15, defaults to 0.
**** {{nbt|compound|faces}}: Holds all the faces of the cuboid. If a face is left out, it does not render.
***** {{nbt|compound|''Face''}}: Named down
, up
, north
, south
, west
or east
. Contains the properties of the specified face.
****** {{nbt|list|uv:}} Defines the area of the texture to use according to the scheme [x1, y1, x2, y2]
. If unset, it defaults to values equal to xyz position of the element. The texture behavior is inconsistent if UV extends below 0 or above 16. If the numbers of x1
and x2
are swapped (e.g. from 0, 0, 16, 16
to 16, 0, 0, 16
), the texture flips. UV is optional, and if not supplied it automatically generates based on the element's position.
****** {{nbt|string|texture:}} Specifies the texture in form of the texture variable prepended with a #
.
****** {{nbt|string|cullface:}} Specifies whether a face does not need to be rendered when there is a block touching it in the specified position. The position can be: down
, up
, north
, south
, west
, or east
. It also determines the side of the block to use the light level from for lighting the face, and if unset, defaults to the side.
****** {{nbt|int|rotation}}: Rotates the texture by the specified number of degrees. Can be 0, 90, 180, or 270. Defaults to 0. Rotation does not affect which part of the texture is used. Instead, it amounts to permutation of the selected texture vertexes (selected implicitly, or explicitly though uv
).
****** {{nbt|int|tintindex}}: Determines whether to tint the texture using a hardcoded tint index. Tint indexes are hard coded into an item and each tint index represents a different color (as defined in the item class). Only certain blocks/items have a tint index; all others remain unaffected.
** {{nbt|list|overrides}}: As of [[24w45a | 24w45a]]/[[1.21.4 | 1.21.4]]+, overrides have been removed & replaced with a new system. Documentation for it can be found [[Items_model_definition | here]].
assets//equipment
directory of a resource pack
wolf_body
, horse_body
, llama_body
, humanoid
, humanoid_leggings
, and wings
. If a layer is omitted, the armor piece does not render when in the respective slot (with the exception of the head slot, where the regular item model is rendered instead)
*** {{nbt | list | Layer definitions}}: The layers for this layer type.
**** {{nbt | string | texture}}: A namespaced id pointing to a texture for this layer. namespace:path
resolves to assets//textures/entity/equipment//.png
**** {{nbt | string | dyeable}}: (optional) Specifies how this layer behaves when dyed (in the dyeable
item tag, and has [[Data_component_format#dyed_color | dyed_color data component]])
***** {{nbt | int | color_when_undyed}}: (optional) An rgb int in decimal representation. The color to tint this layer if the item is undyable or not dyed. ''If this is not present and the item is not dyed, the layer is hidden.''
**** {{nbt | string | use_player_texture}}: (optional, default: false) If set to true, the layer texture is overridden by a texture given by the player. ''This is currently used only for the wings
layer type, where the cape texture is used instead.''
"rotateVariantTextures"
to preserve uv details through rotation.}}
|{{HistoryLine|||dev=14w25a|The directional attribute from the uv definition has now been removed and replaced it with explicit texture references. "textureFacing"
has been replaced with "texture"
parameter, which is now prepended with the hash symbol (#).
|"useAmbientOcclusion" has now been renamed to "ambientocclusion".
|"rotateVariantTextures" has now been renamed to "UV lock".
|"cull" has now been renamed to "cullface", specifies the opposite of which neighboring face causes culling to occur.
|Rotation has now been made more verbose, it is now more clear that it can occur only on a single axis. Example, the rotation for one of the two faces of the "cross"
model is now: "rotation": { "origin": [ 8, 8, 8 ], "axis": "y", "angle": 45, "rescale": true },
.
|The folder models/blocks/meshes
has now been removed and model files are now stored in models/block
.
|The folder blockstates has now been added and stores the model selection files previously found in models/block
.
|The model format now supports custom [[item]] models.}}
|{{HistoryLine|||dev=14w27a|[[Block]] state names have now been replaced with data that better reflects the internal data. This does not yet reflect all data for some blocks and switches to using the actual stored data in a future version when numerical data values are completely dropped in favor of block states.}}
|{{HistoryLine|||dev=14w27b|The block state files now support an array of models allowing for random models.}}
|{{HistoryLine|||dev=14w30a|Added the item model "builtin/entity"
.}}
|{{HistoryLine||1.8.2|dev=pre5|slink=1.8.2-pre5|The tag "translation" is now limited to the range of -24 to 24.
|The tag "scale" is now limited to 4 or less.}}
|{{HistoryLine||1.9|dev=15w31a|UV is now optional, and if not supplied it automatically generates based on the element's position.
|Added different models/textures for different [[damage]] values, [[item]] states, and whether the [[player]] is left handed. This works on [[compass]]es, [[clock]]s, and anything that can have a durability bar. It also contains additional tags for [[bow]]s and [[fishing rod]]s.
|Models can now be put together based on block state attributes, such as [[fence]]s. As a result, the vanilla set of [[block]] models was reduced by almost 300 models.
|Block model JSON is now strict, comments and quoteless identifiers are now not allowed.
|"display" tag defaults have now been changed, and the "thirdperson"
and "firstperson"
tags have now been replaced with "thirdperson_righthand"
, "thirdperson_lefthand"
, "firstperson_righthand"
, and "firstperson_lefthand"
.
|"parent" and "elements" tags can now coexist, though the top level elements tag overwrites all former ones.
|The option to disable alternate [[block]] models has now been removed.
|Multipart tag functionality added.
|Default model offset/position and scale has changed.
|Known bug in this version caused many/all items to be shifted down/positioned wrongly compared to prior versions. [https://bugs.mojang.com/browse/MC-82928 MC-82928]}}
|{{HistoryLine|||dev=15w31c|Item positions have been fixed to match how they were prior to 15w31a. Although the fishing rod is still different and still is to this day.}}
|{{HistoryLine||1.14|dev=18w43a|Added the item model property "custom_model_data"
.}}
|{{HistoryLine||1.15.2|dev=Pre-Release 1|The gui_light parameter for item models has been added.}}
|{{HistoryLine||1.21.2|dev=24w36a|All item models can now use the broken
property in model overrides that was previously limited to just [[elytra]].|The appearance of equipment when equipped by players or certain mobs can now be customized by defining 'equipment models' in the Resource Pack.|The model of a item are selected based on the {{cd|minecraft:item_model}} component, folowing the format /assets//models/item/
.}}
|{{HistoryLine||1.21.4|dev=24w45a|New format has been introduced for describing item models. See [[Items model definition]].|The {{cd|minecraft:item_model}} component now reference a Items model definition.|{{cd|overrides}} section has been removed from existing block models.|There are no longer any hardcoded paths in {{cd|models}} directory - models will be now only used if referenced by definitions in {{cd|items}} or {{cd|blockstates}} directories.|Models in {{cd|models/item}} that only redirect to a block model have been removed.|{{cd|equipment}} directory has been moved one level up, i.e. {{cd|models/equipment/}} becomes {{cd|equipment/}}.
}}
}}
== References ==
{{reflist}}
== Navigation ==
{{Navbox resource packs}}
{{Navbox Java Edition technical|resourcepack}}
[[de:Modelldaten]]
[[es:Modelo]]
[[fr:Modèle]]
[[ja:モデル]]
[[pl:Modele bloków]]
[[pt:Modelo]]
[[zh:模型]]