Buy Me a Coffee at ko-fi.com

Represents a node in the model tree, basically a group/cube/mesh in Blockbench
Each bbmodel file is itself a ModelPart, and all of your models are contained in a global ModelPart called "models"

Adds the given part into this part's children list

overload 1:
ModelPart.addChild(part: ModelPart): ModelPart
typings.-6801764typings.-6801764
Method PropertyFluent DescriptionRepresentation
part accepts
Return Value

Adds the given Render Task on this part

overload 1:
ModelPart.addTask(renderTask: RenderTask): RenderTask
typings.-1107424165typings.-1107424165
Method PropertyFluent DescriptionRepresentation
renderTask accepts
Return Value

Sets the color multiplier for this part for primary and secondary colors
Values are RGB from 0 to 1

overload 1:
ModelPart.color(color: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
color accepts
Return Value
overload 2:
ModelPart.color(r: Number, g: Number, b: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
r accepts
g accepts
b accepts
Return Value

Returns a copy of this part, with all customizations and vertices copied
Children parts are passed as reference, in a new list

overload 1:
ModelPart.copy(name: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
name accepts
Return Value

Return a table of all texture ids and their vertices

overload 1:
ModelPart.getAllVertices(): Table
typings.80563118
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the position offset provided by the currently active animation of this model part

overload 1:
ModelPart.getAnimPos(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the rotation offset provided by the currently active animation of this model part

overload 1:
ModelPart.getAnimRot(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the scale multiplier provided by the currently active animation of this model part

overload 1:
ModelPart.getAnimScale(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the children of this part, stored in a table

overload 1:
ModelPart.getChildren(): ModelPart[]
typings.2053442302
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the average set color from this part, as adding the primary color with the secondary, then dividing them
Values are RGB from 0 to 1

overload 1:
ModelPart.getColor(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the light level you set earlier to this part
Does not interact with Minecraft's lighting system, only retrieving values you set earlier with setLight()

overload 1:
ModelPart.getLight(): Vector2
typings.2002444079
Method PropertyFluent DescriptionRepresentation
Return Value

The name of this model part

overload 1:
ModelPart.getName(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Recalculates the normal matrix for this model part, based on its current position, rotation, scale, and pivot, then returns this matrix

overload 1:
ModelPart.getNormalMatrix(): Matrix3
typings.-1789003662
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the normal matrix for this model part
The Raw version of the function is different in that it doesn't recalculate the matrix before returning it

overload 1:
ModelPart.getNormalMatrixRaw(): Matrix3
typings.-1789003662
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the pivot offset of the model part, offset from its pivot in Blockbench
For absolute pivot point values, check out the non-offset pivot functions

overload 1:
ModelPart.getOffsetPivot(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the rotation offset of the model part, offset from its rotation in Blockbench
For absolute rotation values, check out the non-offset rot functions

overload 1:
ModelPart.getOffsetRot(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the scale offset of the model part, offset from its default scale
For absolute scale values, check out the non-offset rot functions

overload 1:
ModelPart.getOffsetScale(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the opacity multiplier of this part
Note that opacity settings will only take effect if the part has a suitable Render Type for them, mainly TRANSLUCENT
Check out modelPart.setPrimaryRenderType() for how to do this

overload 1:
ModelPart.getOpacity(): Number
typings.-1950496919
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the overlay color you set earlier to this part
Does not interact with Minecraft's overlay system, only retrieving values you set earlier with setOverlay()

overload 1:
ModelPart.getOverlay(): Vector2
typings.2002444079
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the parent part of this part
If this part has no parent, returns nil

overload 1:
ModelPart.getParent(): ModelPart | nil
typings.-136151575
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the current parent type of the part

overload 1:
ModelPart.getParentType(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the pivot point of the model part, including its pivot in Blockbench
For relative values, check out the "offset" pivot functions

overload 1:
ModelPart.getPivot(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the position of the model part, as an offset from its position in Blockbench
Only changes from {0,0,0} when you call setPos()

overload 1:
ModelPart.getPos(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Recalculates the matrix for this model part, based on its current position, rotation, scale, and pivot, then returns this matrix

overload 1:
ModelPart.getPositionMatrix(): Matrix4
typings.-1789003661
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the position matrix for this model part
The Raw version of the function is different in that it doesn't recalculate the matrix before getting it

overload 1:
ModelPart.getPositionMatrixRaw(): Matrix4
typings.-1789003661
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the primary color multiplier of this part
Values are RGB from 0 to 1

overload 1:
ModelPart.getPrimaryColor(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the primary textures of this part
Returns a table of each texture for the specified face.

overload 1:
ModelPart.getPrimaryDefinedTextures(): AnyType
typings.821772070
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the current primary render type of this model part
Nil by default, meaning the part copies the primary render type of its parent

overload 1:
ModelPart.getPrimaryRenderType(): RenderTypes | nil
typings.1595994736
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the primary texture of this part
Returns two values, first being the override type, second being the value, if any.

overload 1:
ModelPart.getPrimaryTexture(): Varargs
typings.1901216868
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the rotation of the model part, including its rotation in Blockbench
For relative rotation values, check out the "offset" rot functions

overload 1:
ModelPart.getRot(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the scale of the model part, as a multiple of its Blockbench size
Only changes from {1,1,1} when you call setScale()

overload 1:
ModelPart.getScale(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the secondary color multiplier of this part
Values are RGB from 0 to 1

overload 1:
ModelPart.getSecondaryColor(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the secondary textures of this part
Returns a table of each texture for the specified face.

overload 1:
ModelPart.getSecondaryDefinedTextures(): AnyType
typings.821772070
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the current secondary render type of this model part
Nil by default, meaning the part copies the secondary render type of its parent

overload 1:
ModelPart.getSecondaryRenderType(): RenderTypes | nil
typings.1595994736
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the secondary texture of this part
Returns two values, first being the override type, second being the value, if any.

overload 1:
ModelPart.getSecondaryTexture(): AnyType
typings.821772070
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the Render Task with the given name from this part
Returns a table with all tasks if a name is not given

overload 1:
ModelPart.getTask(): Table<String, RenderTask>
typings.-370082896
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
ModelPart.getTask(taskName: String): RenderTask
typings.-1808118735typings.-1107424165
Method PropertyFluent DescriptionRepresentation
taskName accepts
Return Value

Gets the width, height of this part's texture in pixels
Throws an error if this part has multiple different-sized textures on it, or if the part is a Group

overload 1:
ModelPart.getTextureSize(): Vector2
typings.2002444079
Method PropertyFluent DescriptionRepresentation
Return Value

Returns a table with all textures used by this part
Does not include children textures, so groups usually will return an empty table

overload 1:
ModelPart.getTextures(): Table
typings.80563118
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the true pivot of this model part, which is a sum of the pivot and the offset pivot

overload 1:
ModelPart.getTruePivot(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the true position of this model part, which is a sum of the position and the animation position

overload 1:
ModelPart.getTruePos(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the true rotation of this model part, which is a sum of the rotation, the offset rotation and the animation position

overload 1:
ModelPart.getTrueRot(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the true scale of this model part, which is a sum of the scale, the offset scale and the animation scale

overload 1:
ModelPart.getTrueScale(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Returns whether this part is a "GROUP", a "CUBE", or a "MESH"

overload 1:
ModelPart.getType(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the UV of this part
This function is normalized, meaning it will return values between 0 to 1

overload 1:
ModelPart.getUV(): Vector2
typings.2002444079
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the UV matrix of this part

overload 1:
ModelPart.getUVMatrix(): Matrix3
typings.-1789003662
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the UV of this part
Automatically multiplies the result by getTextureSize()
Errors if the part has multiple different-sized textures of if the part is a Group

overload 1:
ModelPart.getUVPixels(): Vector2
typings.2002444079
Method PropertyFluent DescriptionRepresentation
Return Value

Return a table with all vertices from the given texture id
Returns nil if no vertices were found

overload 1:
ModelPart.getVertices(textureID: String): Table
typings.-1808118735typings.80563118
Method PropertyFluent DescriptionRepresentation
textureID accepts
Return Value

Gets whether or not this model part is visible
Works recursivly. If a parent of this part is invisible, this part will also return false

overload 1:
ModelPart.getVisible(): Boolean | nil
typings.1169263189
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if this part is a child of the given part

overload 1:
ModelPart.isChildOf(part: ModelPart): Boolean
typings.-6801764typings.1729365000
Method PropertyFluent DescriptionRepresentation
part accepts
Return Value

Sets the light level to be used when rendering this part
Values you give are 0 to 15, indicating the block light and sky light levels you want to use
Passing nil will reset the lighting override for this part

overload 1:
ModelPart.light(light: Vector2): ModelPart
typings.2002444079typings.-6801764
Method PropertyFluent DescriptionRepresentation
light accepts
Return Value
overload 2:
ModelPart.light(blockLight: Integer, skyLight: Integer): ModelPart
typings.-672261858typings.-672261858typings.-6801764
Method PropertyFluent DescriptionRepresentation
blockLight accepts
skyLight accepts
Return Value

Sets the given matrix as the position matrix for this model part
The normal matrix is automatically calculated as the inverse transpose of this matrix
Calling this DOES NOT CHANGE the values of position, rot, or scale in the model part
If you call setPos() or a similar function, the effects of setMatrix() will be overwritten

overload 1:
ModelPart.matrix(matrix: Matrix4): ModelPart
typings.-1789003661typings.-6801764
Method PropertyFluent DescriptionRepresentation
matrix accepts
Return Value

Moves this part to be a child of the given part

overload 1:
ModelPart.moveTo(part: ModelPart): ModelPart
typings.-6801764typings.-6801764
Method PropertyFluent DescriptionRepresentation
part accepts
Return Value

Adds a new Block Render Task on this part

overload 1:
ModelPart.newBlock(taskName: String): BlockTask
typings.-1808118735typings.-1418559598
Method PropertyFluent DescriptionRepresentation
taskName accepts
Return Value

Adds a new Entity Render Task on this part

overload 1:
ModelPart.newEntity(taskName: String): EntityTask
typings.-1808118735typings.510443560
Method PropertyFluent DescriptionRepresentation
taskName accepts
Return Value

Adds a new Item Render Task on this part

overload 1:
ModelPart.newItem(taskName: String): ItemTask
typings.-1808118735typings.1242154840
Method PropertyFluent DescriptionRepresentation
taskName accepts
Return Value

Creates a new, empty, group model part as a child of this part, at the same pivot point
Takes two arguments, the new part's name, and optionally its parent type

overload 1:
ModelPart.newPart(name: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
name accepts
Return Value
overload 2:
ModelPart.newPart(name: String, parentType: String): ModelPart
typings.-1808118735typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
name accepts
parentType accepts
Return Value

Adds a new Sprite Render Task on this part

overload 1:
ModelPart.newSprite(taskName: String): SpriteTask
typings.-1808118735typings.-769810934
Method PropertyFluent DescriptionRepresentation
taskName accepts
Return Value

Adds a new Text Render Task on this part

overload 1:
ModelPart.newText(taskName: String): TextTask
typings.-1808118735typings.-939002766
Method PropertyFluent DescriptionRepresentation
taskName accepts
Return Value

Sets the pivot offset point for this part (multiplicative)
Nil values are assumed to be 0
For absolute pivot point values, check out the non-offset pivot functions

overload 1:
ModelPart.offsetPivot(offsetPivot: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
offsetPivot accepts
Return Value
overload 2:
ModelPart.offsetPivot(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the rotation offset for this part
Nil values for rotation are assumed to be 0
Angles are given in degrees
For absolute rotation values, check out the non-offset rot functions

overload 1:
ModelPart.offsetRot(offsetRot: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
offsetRot accepts
Return Value
overload 2:
ModelPart.offsetRot(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the scale offset for this part
Nil values are assumed to be 1
For absolute scale values, check out the non-offset rot functions

overload 1:
ModelPart.offsetScale(offsetScale: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
offsetScale accepts
Return Value
overload 2:
ModelPart.offsetScale(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the opacity multiplier of this part
Note that opacity settings will only take effect if the part has a suitable Render Type for them, mainly TRANSLUCENT
Check out modelPart.setPrimaryRenderType() for how to do this

overload 1:
ModelPart.opacity(opacity: Number): ModelPart
typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
opacity accepts
Return Value

Sets the overlay color to be used when rendering this part
Values you give are 0 to 15, indicating the white overlay and the damage overlay levels you want to use
Passing nil will reset the overlay override for this part

overload 1:
ModelPart.overlay(overlay: Vector2): ModelPart
typings.2002444079typings.-6801764
Method PropertyFluent DescriptionRepresentation
overlay accepts
Return Value
overload 2:
ModelPart.overlay(whiteOverlay: Integer, hurtOverlay: Integer): ModelPart
typings.-672261858typings.-672261858typings.-6801764
Method PropertyFluent DescriptionRepresentation
whiteOverlay accepts
hurtOverlay accepts
Return Value

Returns if this part vanilla position is being overridden by an animation

overload 1:
ModelPart.overrideVanillaPos(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns if this part vanilla rotation is being overridden by an animation

overload 1:
ModelPart.overrideVanillaRot(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns if this part vanilla scale is being overridden by an animation

overload 1:
ModelPart.overrideVanillaScale(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Sets the parent type of the part
See the ParentType parts in the list docs for legal types

overload 1:
ModelPart.parentType(parentType: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
parentType accepts
Return Value

Gets a matrix which transforms a point from this part's position to a world location
Recommended to use this in POST_RENDER, as by then the matrix is updated
In RENDER it will be 1 frame behind the part's visual position for that frame
Also, if the model is not rendered in-world, the part's matrix will not be updated
Paperdoll rendering and other UI renderings will not affect this matrix

overload 1:
ModelPart.partToWorldMatrix(): Matrix4
typings.-1789003661
Method PropertyFluent DescriptionRepresentation
Return Value

Sets the absolute pivot for this part
Nil values are assumed to be 0
For relative pivot offsets, check out the "offset" pivot functions

overload 1:
ModelPart.pivot(pivot: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
pivot accepts
Return Value
overload 2:
ModelPart.pivot(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the position offset for this part from its Blockbench position
Nil values for position are assumed to be 0

overload 1:
ModelPart.pos(pos: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
ModelPart.pos(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the primary color multiplier for this part
Values are RGB from 0 to 1

overload 1:
ModelPart.primaryColor(color: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
color accepts
Return Value
overload 2:
ModelPart.primaryColor(r: Number, g: Number, b: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
r accepts
g accepts
b accepts
Return Value

Sets the current primary render type of this model part
Nil by default, meaning the part copies the primary render type of its parent during rendering
Check the docs enum command for all render types

overload 1:
ModelPart.primaryRenderType(renderType: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
renderType accepts
Return Value

Sets the primary texture override of this part
Check the TextureType types in the list docs
If using "resource", the second parameter should indicate the path to the Minecraft texture you want to use
If using "custom", the second parameter should indicate a texture object

overload 1:
ModelPart.primaryTexture(textureType: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
textureType accepts
Return Value
overload 2:
ModelPart.primaryTexture(resource: String, path: String): ModelPart
typings.-1808118735typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
resource accepts
path accepts
Return Value
overload 3:
ModelPart.primaryTexture(custom: String, texture: Texture): ModelPart
typings.-1808118735typings.246836475typings.-6801764
Method PropertyFluent DescriptionRepresentation
custom accepts
texture accepts
Return Value

Removes this part from the parent model part

overload 1:
ModelPart.remove(): ModelPart
typings.-6801764
Method PropertyFluent DescriptionRepresentation
Return Value

Removes the given part from this part's children list

overload 1:
ModelPart.removeChild(part: ModelPart): ModelPart
typings.-6801764typings.-6801764
Method PropertyFluent DescriptionRepresentation
part accepts
Return Value

Removes the Task with the given name from this part
Removes ALL tasks if a name is not given

overload 1:
ModelPart.removeTask(): ModelPart
typings.-6801764
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
ModelPart.removeTask(taskName: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
taskName accepts
Return Value
overload 3:
ModelPart.removeTask(renderTask: RenderTask): ModelPart
typings.-1107424165typings.-6801764
Method PropertyFluent DescriptionRepresentation
renderTask accepts
Return Value

Sets the absolute rotation for this part
Nil values for rotation are assumed to be 0
Angles are given in degrees
For relative rotation values, check out the "offset" rot functions

overload 1:
ModelPart.rot(rot: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
rot accepts
Return Value
overload 2:
ModelPart.rot(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the scale factor for this part
Nil values for scale are assumed to be 1

overload 1:
ModelPart.scale(scale: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
scale accepts
Return Value
overload 2:
ModelPart.scale(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the secondary color multiplier for this part
Values are RGB from 0 to 1

overload 1:
ModelPart.secondaryColor(color: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
color accepts
Return Value
overload 2:
ModelPart.secondaryColor(r: Number, g: Number, b: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
r accepts
g accepts
b accepts
Return Value

Sets the current secondary render type of this model part
Nil by default, meaning the part copies the secondary render type of its parent during rendering
Check the docs enum command for all render types

overload 1:
ModelPart.secondaryRenderType(renderType: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
renderType accepts
Return Value

Sets the secondary texture override of this part
Check the TextureType types in the list docs
If using "resource", the second parameter should indicate the path to the Minecraft texture you want to use
If using "custom", the second parameter should indicate a texture object

overload 1:
ModelPart.secondaryTexture(textureType: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
textureType accepts
Return Value
overload 2:
ModelPart.secondaryTexture(resource: String, path: String): ModelPart
typings.-1808118735typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
resource accepts
path accepts
Return Value
overload 3:
ModelPart.secondaryTexture(custom: String, texture: Texture): ModelPart
typings.-1808118735typings.246836475typings.-6801764
Method PropertyFluent DescriptionRepresentation
custom accepts
texture accepts
Return Value

Sets the color multiplier for this part for primary and secondary colors
Values are RGB from 0 to 1

overload 1:
ModelPart.setColor(color: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
color accepts
Return Value
overload 2:
ModelPart.setColor(r: Number, g: Number, b: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
r accepts
g accepts
b accepts
Return Value

Sets the light level to be used when rendering this part
Values you give are 0 to 15, indicating the block light and sky light levels you want to use
Passing nil will reset the lighting override for this part

overload 1:
ModelPart.setLight(light: Vector2): ModelPart
typings.2002444079typings.-6801764
Method PropertyFluent DescriptionRepresentation
light accepts
Return Value
overload 2:
ModelPart.setLight(blockLight: Integer, skyLight: Integer): ModelPart
typings.-672261858typings.-672261858typings.-6801764
Method PropertyFluent DescriptionRepresentation
blockLight accepts
skyLight accepts
Return Value

Sets the given matrix as the position matrix for this model part
The normal matrix is automatically calculated as the inverse transpose of this matrix
Calling this DOES NOT CHANGE the values of position, rot, or scale in the model part
If you call setPos() or a similar function, the effects of setMatrix() will be overwritten

overload 1:
ModelPart.setMatrix(matrix: Matrix4): ModelPart
typings.-1789003661typings.-6801764
Method PropertyFluent DescriptionRepresentation
matrix accepts
Return Value

Sets a function to run during the middle of this part's rendering, after its matrices are calculated

overload 1:
ModelPart.setMidRender(function: Function): ModelPart
typings.1445582840typings.-6801764
Method PropertyFluent DescriptionRepresentation
function accepts
Return Value

Sets the pivot offset point for this part (multiplicative)
Nil values are assumed to be 0
For absolute pivot point values, check out the non-offset pivot functions

overload 1:
ModelPart.setOffsetPivot(offsetPivot: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
offsetPivot accepts
Return Value
overload 2:
ModelPart.setOffsetPivot(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the rotation offset for this part
Nil values for rotation are assumed to be 0
Angles are given in degrees
For absolute rotation values, check out the non-offset rot functions

overload 1:
ModelPart.setOffsetRot(offsetRot: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
offsetRot accepts
Return Value
overload 2:
ModelPart.setOffsetRot(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the scale offset for this part
Nil values are assumed to be 1
For absolute scale values, check out the non-offset rot functions

overload 1:
ModelPart.setOffsetScale(offsetScale: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
offsetScale accepts
Return Value
overload 2:
ModelPart.setOffsetScale(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the opacity multiplier of this part
Note that opacity settings will only take effect if the part has a suitable Render Type for them, mainly TRANSLUCENT
Check out modelPart.setPrimaryRenderType() for how to do this

overload 1:
ModelPart.setOpacity(opacity: Number): ModelPart
typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
opacity accepts
Return Value

Sets the overlay color to be used when rendering this part
Values you give are 0 to 15, indicating the white overlay and the damage overlay levels you want to use
Passing nil will reset the overlay override for this part

overload 1:
ModelPart.setOverlay(overlay: Vector2): ModelPart
typings.2002444079typings.-6801764
Method PropertyFluent DescriptionRepresentation
overlay accepts
Return Value
overload 2:
ModelPart.setOverlay(whiteOverlay: Integer, hurtOverlay: Integer): ModelPart
typings.-672261858typings.-672261858typings.-6801764
Method PropertyFluent DescriptionRepresentation
whiteOverlay accepts
hurtOverlay accepts
Return Value

Sets the parent type of the part
See the ParentType parts in the list docs for legal types

overload 1:
ModelPart.setParentType(parentType: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
parentType accepts
Return Value

Sets the absolute pivot for this part
Nil values are assumed to be 0
For relative pivot offsets, check out the "offset" pivot functions

overload 1:
ModelPart.setPivot(pivot: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
pivot accepts
Return Value
overload 2:
ModelPart.setPivot(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the position offset for this part from its Blockbench position
Nil values for position are assumed to be 0

overload 1:
ModelPart.setPos(pos: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
pos accepts
Return Value
overload 2:
ModelPart.setPos(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets a function to run after this part and its children are rendered

overload 1:
ModelPart.setPostRender(function: Function): ModelPart
typings.1445582840typings.-6801764
Method PropertyFluent DescriptionRepresentation
function accepts
Return Value

Sets a function to run before this part starts being rendered

overload 1:
ModelPart.setPreRender(function: Function): ModelPart
typings.1445582840typings.-6801764
Method PropertyFluent DescriptionRepresentation
function accepts
Return Value

Sets the primary color multiplier for this part
Values are RGB from 0 to 1

overload 1:
ModelPart.setPrimaryColor(color: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
color accepts
Return Value
overload 2:
ModelPart.setPrimaryColor(r: Number, g: Number, b: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
r accepts
g accepts
b accepts
Return Value

Sets the current primary render type of this model part
Nil by default, meaning the part copies the primary render type of its parent during rendering
Check the docs enum command for all render types

overload 1:
ModelPart.setPrimaryRenderType(renderType: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
renderType accepts
Return Value

Sets the primary texture override of this part
Check the TextureType types in the list docs
If using "resource", the second parameter should indicate the path to the Minecraft texture you want to use
If using "custom", the second parameter should indicate a texture object

overload 1:
ModelPart.setPrimaryTexture(textureType: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
textureType accepts
Return Value
overload 2:
ModelPart.setPrimaryTexture(resource: String, path: String): ModelPart
typings.-1808118735typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
resource accepts
path accepts
Return Value
overload 3:
ModelPart.setPrimaryTexture(custom: String, texture: Texture): ModelPart
typings.-1808118735typings.246836475typings.-6801764
Method PropertyFluent DescriptionRepresentation
custom accepts
texture accepts
Return Value

Sets the absolute rotation for this part
Nil values for rotation are assumed to be 0
Angles are given in degrees
For relative rotation values, check out the "offset" rot functions

overload 1:
ModelPart.setRot(rot: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
rot accepts
Return Value
overload 2:
ModelPart.setRot(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the scale factor for this part
Nil values for scale are assumed to be 1

overload 1:
ModelPart.setScale(scale: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
scale accepts
Return Value
overload 2:
ModelPart.setScale(x: Number, y: Number, z: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
x accepts
y accepts
z accepts
Return Value

Sets the secondary color multiplier for this part
Values are RGB from 0 to 1

overload 1:
ModelPart.setSecondaryColor(color: Vector3): ModelPart
typings.2002444080typings.-6801764
Method PropertyFluent DescriptionRepresentation
color accepts
Return Value
overload 2:
ModelPart.setSecondaryColor(r: Number, g: Number, b: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
r accepts
g accepts
b accepts
Return Value

Sets the current secondary render type of this model part
Nil by default, meaning the part copies the secondary render type of its parent during rendering
Check the docs enum command for all render types

overload 1:
ModelPart.setSecondaryRenderType(renderType: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
renderType accepts
Return Value

Sets the secondary texture override of this part
Check the TextureType types in the list docs
If using "resource", the second parameter should indicate the path to the Minecraft texture you want to use
If using "custom", the second parameter should indicate a texture object

overload 1:
ModelPart.setSecondaryTexture(textureType: String): ModelPart
typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
textureType accepts
Return Value
overload 2:
ModelPart.setSecondaryTexture(resource: String, path: String): ModelPart
typings.-1808118735typings.-1808118735typings.-6801764
Method PropertyFluent DescriptionRepresentation
resource accepts
path accepts
Return Value
overload 3:
ModelPart.setSecondaryTexture(custom: String, texture: Texture): ModelPart
typings.-1808118735typings.246836475typings.-6801764
Method PropertyFluent DescriptionRepresentation
custom accepts
texture accepts
Return Value

Sets the UV of this part
This function is normalized, meaning it works with values 0 to 1
If you say setUV(0.5, 0.25), for example, it will scroll by half of your texture width to the right, and one-fourth of the texture width downwards

overload 1:
ModelPart.setUV(uv: Vector2): ModelPart
typings.2002444079typings.-6801764
Method PropertyFluent DescriptionRepresentation
uv accepts
Return Value
overload 2:
ModelPart.setUV(u: Number, v: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
u accepts
v accepts
Return Value

Sets the UV matrix of this part
This matrix is applied to all UV points during the transform, with the UVs treated as homogeneous vectors
setUV() and setUVPixels() are just simpler ways of setting this matrix

overload 1:
ModelPart.setUVMatrix(matrix: Matrix3): ModelPart
typings.-1789003662typings.-6801764
Method PropertyFluent DescriptionRepresentation
matrix accepts
Return Value

Sets the UV of this part in pixels
Automatically divides by the results of getTextureSize(), so you can just input the number of pixels you want the UV to scroll by
Errors if the part has multiple different-sized textures
If this part is a Group, it will attempt to setUVPixels on its children

overload 1:
ModelPart.setUVPixels(uv: Vector2): ModelPart
typings.2002444079typings.-6801764
Method PropertyFluent DescriptionRepresentation
uv accepts
Return Value
overload 2:
ModelPart.setUVPixels(u: Number, v: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
u accepts
v accepts
Return Value

Sets this part to be visible or invisible
Children of invisible parts are also not visible and will not be processed

overload 1:
ModelPart.setVisible(visible: Boolean): ModelPart
typings.1729365000typings.-6801764
Method PropertyFluent DescriptionRepresentation
visible accepts
Return Value

Sets the UV of this part
This function is normalized, meaning it works with values 0 to 1
If you say setUV(0.5, 0.25), for example, it will scroll by half of your texture width to the right, and one-fourth of the texture width downwards

overload 1:
ModelPart.uv(uv: Vector2): ModelPart
typings.2002444079typings.-6801764
Method PropertyFluent DescriptionRepresentation
uv accepts
Return Value
overload 2:
ModelPart.uv(u: Number, v: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
u accepts
v accepts
Return Value

Sets the UV matrix of this part
This matrix is applied to all UV points during the transform, with the UVs treated as homogeneous vectors
setUV() and setUVPixels() are just simpler ways of setting this matrix

overload 1:
ModelPart.uvMatrix(matrix: Matrix3): ModelPart
typings.-1789003662typings.-6801764
Method PropertyFluent DescriptionRepresentation
matrix accepts
Return Value

Sets the UV of this part in pixels
Automatically divides by the results of getTextureSize(), so you can just input the number of pixels you want the UV to scroll by
Errors if the part has multiple different-sized textures
If this part is a Group, it will attempt to setUVPixels on its children

overload 1:
ModelPart.uvPixels(uv: Vector2): ModelPart
typings.2002444079typings.-6801764
Method PropertyFluent DescriptionRepresentation
uv accepts
Return Value
overload 2:
ModelPart.uvPixels(u: Number, v: Number): ModelPart
typings.-1950496919typings.-1950496919typings.-6801764
Method PropertyFluent DescriptionRepresentation
u accepts
v accepts
Return Value

Sets this part to be visible or invisible
Children of invisible parts are also not visible and will not be processed

overload 1:
ModelPart.visible(visible: Boolean): ModelPart
typings.1729365000typings.-6801764
Method PropertyFluent DescriptionRepresentation
visible accepts
Return Value

Function to run during the middle of this part's rendering, after its matrices are calculated

field signature:
ModelPart.midRender: Function
typings.1445582840
Method PropertyFluent DescriptionRepresentation
Field Type

Function to run after this part and its children are rendered

field signature:
ModelPart.postRender: Function
typings.1445582840
Method PropertyFluent DescriptionRepresentation
Field Type

Function to run before this part starts being rendered

field signature:
ModelPart.preRender: Function
typings.1445582840
Method PropertyFluent DescriptionRepresentation
Field Type