Models

Documentation for models introduced by tetra.

Module model

Modules and improvements can provide their items with models that the item render when displayed in the world (or in a UI).

Flat model definition

Flat models are like standard vanilla item models (extruded from textures), several of these are then composed to form the model of most items.

Format:
typeoptionalstring
Example values:
item
static
draw_0
draw_1
draw_2
tetra:plate/tower

For bows this usually determines when a model should be included as the bow is being drawn, where a value of "draw_0", "draw_1", "draw_2" would determine which draw stage the model would show during and "static" would cause the model to show regardless of draw stage. For shields this field is a resource location referencing a model geometry resource relative "assets/<namespace>/models/modular/shield/". Default: "item".

locationResource location
Example values:
tetra:item/module/shield/plate/tower/
tetra:item/module/toolbelt/belt/inlaid

References a texture relative "assets/<namespace>/textures/". Material based module variants typically affix this based on the material and what's available in its "availableTextures" array.

renderTypeoptionalResource location

Allows for a different render type to be used when rendering the model. Default: "minecraft:solid".

transformoptional
translationoptional
array[
number
number
number
]

Allows the model to be translated, a value of 1 would equal 16px in a standard sized model. The x and y axis align with the corresponding axis in the texture, the z axis is perpendicular to the texture. Format: [x, y, z]

scaleoptional
array[
number
number
number
]

Allows the model to be scaled. The x and y axis align with the corresponding axis in the texture, the z axis is perpendicular to the texture. Format: [x, y, z]

rotationoptional
array[
number
]

A quaternion used to rotate the model, the values are in degrees. The x, y and z values represent the axis of rotation and the w value represents the angle of rotation. Format: [x, y, z, w] It's also possible to provide a 3-dimensional vector with rotations around each axis. (this might not be deserializing properly, let me know if it's broken :P)

emissionoptionalnumber

The emission value of the model, makes the geometry appear to glow in dark environments. A value of 16 would make the model emit light at full brightness, a value of 0 would make the model not emit light at all.

tintoptionalHexadecimal

A color that the model will be tinted with. The color is multiplied with the texture color, a value of #FFFFFF would cause no change, a value of #FF0000 would cause the model to be tinted red.

overlayTintoptionalHexadecimal

Used to tint improvement models that reference the tint of their parent. The value of the 'tint' field is used if this field is not present.

renderLayeroptionalstring
Allowed values:
LOWEST
LOWER
LOW
BASE
HIGH
HIGHER
HIGHEST

Determines the render layer of the model, models with a higher render layer will render on top of models with a lower render layer.

perspectivesoptional
array[
string
Allowed values:
none
thirdperson_lefthand
thirdperson_righthand
firstperson_lefthand
firstperson_righthand
head
gui
ground
fixed
]

Determines which perspectives the model will be rendered in. If this field is not present the model will be rendered in all perspectives.

invertPerspectivesoptionalboolean

If true the model will be rendered in all perspectives except those specified in the 'perspectives' field.