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).

Grid texture model definition

Renders a flat model (like a standard vanilla item model extruded from a texture) from a texture grid. This is the default model type — the 'type' field can be omitted.

Format:
typetetra:grid_texture
locationResource location
Example values:
tetra:item/module/sword/blade/basic/
tetra:item/module/bow/stave/long/

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

renderTypeoptionalResource location

Allows a different render type to be used when rendering the model.

transformoptional
translationoptional
array[
number
number
number
]

Translates the model. A value of 1 equals 16px in a standard-sized model. The x and y axes align with the texture, the z axis is perpendicular to it. Format: [x, y, z]

scaleoptional
array[
number
number
number
]

Scales the model. The x and y axes align with the texture, the z axis is perpendicular to it. Format: [x, y, z]

rotationoptional
array[
number
]

A quaternion used to rotate the model. Format: [x, y, z, w]. A 3-dimensional vector with rotations around each axis may also be provided.

emissionoptionalunknown

Makes the model appear to glow in dark environments. 15 is full brightness, 0 is no glow.

tintoptionalHexadecimal

A color multiplied with the texture color. #FFFFFF causes no change, #FF0000 tints the model red.

overlayTintoptionalHexadecimal

Used to tint improvement models that inherit the tint of their parent. Falls back to 'tint' if not present.

renderLayeroptionalstring
Allowed values:
LOWEST
LOWER
LOW
BASE
HIGH
HIGHER
HIGHEST

Models with a higher render layer render on top of those with a lower one.

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

The perspectives in which this model is rendered. If absent the model renders in all perspectives.

invertPerspectivesoptionalboolean

If true, the model renders in all perspectives except those listed in 'perspectives'.

Filtered grid texture model definition

A grid texture model that is only rendered when the item's render filter matches the 'filter' field. Useful for models that should only show in certain states, such as draw stages for bows.

Format:
typetetra:filtered_grid_texture
filterstring
Example values:
undrawn
draw_0
draw_1
draw_2

The render filter value that must match for this model to be rendered. For bows, valid values are "undrawn", "draw_0", "draw_1", and "draw_2".

locationResource location
Example values:
tetra:item/module/bow/string/basic/
tetra:item/module/bow/string/basic/0_

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

renderTypeoptionalResource location

Allows a different render type to be used when rendering the model.

transformoptional
translationoptional
array[
number
number
number
]

Translates the model. A value of 1 equals 16px in a standard-sized model. The x and y axes align with the texture, the z axis is perpendicular to it. Format: [x, y, z]

scaleoptional
array[
number
number
number
]

Scales the model. The x and y axes align with the texture, the z axis is perpendicular to it. Format: [x, y, z]

rotationoptional
array[
number
]

A quaternion used to rotate the model. Format: [x, y, z, w]. A 3-dimensional vector with rotations around each axis may also be provided.

emissionoptionalunknown

Makes the model appear to glow in dark environments. 15 is full brightness, 0 is no glow.

tintoptionalHexadecimal

A color multiplied with the texture color. #FFFFFF causes no change, #FF0000 tints the model red.

overlayTintoptionalHexadecimal

Used to tint improvement models that inherit the tint of their parent. Falls back to 'tint' if not present.

renderLayeroptionalstring
Allowed values:
LOWEST
LOWER
LOW
BASE
HIGH
HIGHER
HIGHEST

Models with a higher render layer render on top of those with a lower one.

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

The perspectives in which this model is rendered. If absent the model renders in all perspectives.

invertPerspectivesoptionalboolean

If true, the model renders in all perspectives except those listed in 'perspectives'.

Shield model definition

Renders a shield model composed of a 3D model and a texture. Used exclusively by shield item modules.

Format:
typetetra:shield
modelResource location
Example values:
tetra:plate/buckler

References a 3D model relative to "assets/tetra/models/", must be in the tetra namespace.

textureResource location
Example values:
tetra:item/module/shield/plate/buckler/

References a texture relative to "assets/tetra/textures/", must be in the tetra namespace. Material-based module variants typically suffix this based on the material and what's available in its "availableTextures" array.

tintoptionalHexadecimal

A color multiplied with the texture color. #FFFFFF causes no change, #FF0000 tints the model red.

overlayTintoptionalHexadecimal

Used to tint improvement models that inherit the tint of their parent. Falls back to 'tint' if not present.

renderLayeroptionalstring
Allowed values:
LOWEST
LOWER
LOW
BASE
HIGH
HIGHER
HIGHEST

Models with a higher render layer render on top of those with a lower one.