Guide 1 Docs 2 Reference 3
4

ModelPart type

A named group of boxes that turns around its pivot. Units are 16 to the block, the origin is the model's bottom centre, and a box reaches -24..24.

Functions 4

modelPart:part(name: string, opts: { pivot: Vec3? }?) → ModelPart

Makes a child part of this one; it turns around pivot, the model's origin unless you give one.

modelPart:box(from: Vec3, to: Vec3, skin: ModelSkin, opts: { rotation: Vec3?, pivot: Vec3?, faces: { [Face]: ModelSkin }?, }?)

Corners in any order; a box turns on one axis, in steps of 22.5 up to 45, and pivot is the box's own centre unless you give one.

modelPart:hitbox(from: Vec3, to: Vec3)

A box a player can hit on a living body that wears the model (clients from 1.19.4). Not drawn; corners in any order, in model units. Square from above (its longer side), so split a long part. Animations do not move it. A model with none is hit on one box of the body's size.

modelPart:mirror(axis: "x")

A mirrored copy of every box and hitbox this part has, and a mirrored twin named <name>_mirrored of every child. Only "x" in this version.