EntityTask

subclasses RenderTask

A task for rendering an Entity

EntityTask.setHeadRotation

Updates the head rotation of the entity, if applicable
overload 1:
EntityTask:setHeadRotation(rotation)
Method Property Fluent Description Representation
rotation accepts a Vector2
Return Value an EntityTask

EntityTask.asEntity

Returns the entity associated with this task, or nil if the entity could not exist for any reason.
Due to the special circumstances some readings of the subsequent value may be completely useless
overload 1:
EntityTask:asEntity()
Method Property Fluent Description Representation
Return Value an EntityAPI

EntityTask.setNbt

Sets [the nbt of] the entity
overload 1:
EntityTask:setNbt(nbt)
Method Property Fluent Description Representation
nbt accepts a String
Return Value an EntityTask
overload 2:
EntityTask:setNbt(id, nbt)
Method Property Fluent Description Representation
id accepts a String
nbt accepts a String
Return Value an EntityTask

EntityTask.updateWalkingDistance

Updates the walking animations given the new information, if applicable. For an expected result it should be called every tick with the appropriate value
overload 1:
EntityTask:updateWalkingDistance(distance)
Method Property Fluent Description Representation
distance accepts a Number
Return Value an EntityTask

EntityTask.getName

Inherited from RenderTask

Get this task's name
overload 1:
EntityTask:getName()
Method Property Fluent Description Representation
Return Value a String

EntityTask.remove

Inherited from RenderTask

Removes this render task from the parent model part
overload 1:
EntityTask:remove()
Method Property Fluent Description Representation
Return Value a RenderTask

EntityTask.setScale

Inherited from RenderTask

Sets the scale of the task, relative to its attached part
overload 1:
EntityTask:setScale(scale)
Method Property Fluent Description Representation
scale accepts a Vector3
Return Value a RenderTask
overload 2:
EntityTask:setScale(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a RenderTask

EntityTask.isVisible

Inherited from RenderTask

Checks if this task is visible
overload 1:
EntityTask:isVisible()
Method Property Fluent Description Representation
Return Value a Boolean

EntityTask.setVisible

Inherited from RenderTask

Sets whether or not this task should be rendered
overload 1:
EntityTask:setVisible(visible)
Method Property Fluent Description Representation
visible accepts a Boolean
Return Value a RenderTask

EntityTask.setPos

Inherited from RenderTask

Sets the position of the task, relative to its attached part
Uses model coordinates
overload 1:
EntityTask:setPos(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value a RenderTask
overload 2:
EntityTask:setPos(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a RenderTask

EntityTask.setMatrix

Inherited from RenderTask

Sets the given matrix as the position matrix for this render task
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 render task
If you call setPos() or a similar function,
the effects of setMatrix() will be overwritten
overload 1:
EntityTask:setMatrix(matrix)
Method Property Fluent Description Representation
matrix accepts a Matrix4
Return Value a RenderTask

EntityTask.setRot

Inherited from RenderTask

Sets the rotation of the task, relative to its attached part
overload 1:
EntityTask:setRot(rot)
Method Property Fluent Description Representation
rot accepts a Vector3
Return Value a RenderTask
overload 2:
EntityTask:setRot(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a RenderTask

EntityTask.getPositionMatrix

Inherited from RenderTask

Recalculates the matrix for this render task, based on its current position, rotation, scale, and pivot, then returns this matrix
overload 1:
EntityTask:getPositionMatrix()
Method Property Fluent Description Representation
Return Value a Matrix4

EntityTask.getNormalMatrix

Inherited from RenderTask

Recalculates the normal matrix for this render task, based on its current position, rotation, scale, and pivot, then returns this matrix
overload 1:
EntityTask:getNormalMatrix()
Method Property Fluent Description Representation
Return Value a Matrix3

EntityTask.getNormalMatrixRaw

Inherited from RenderTask

Returns the normal matrix for this render task
The Raw version of the function is different in that it doesn't recalculate the matrix before returning it
overload 1:
EntityTask:getNormalMatrixRaw()
Method Property Fluent Description Representation
Return Value a Matrix3

EntityTask.getLight

Inherited from RenderTask

Returns the light override value of this task
overload 1:
EntityTask:getLight()
Method Property Fluent Description Representation
Return Value a Vector2

EntityTask.setLight

Inherited from RenderTask

Sets the light override value of this task
Values are given from 0 to 15,
indicating the block light and sky light levels you want to use
Passing nil will reset the lighting override for this task
overload 1:
EntityTask:setLight(light)
Method Property Fluent Description Representation
light accepts a Vector2
Return Value a RenderTask
overload 2:
EntityTask:setLight(blockLight, skyLight)
Method Property Fluent Description Representation
blockLight accepts an Integer
skyLight accepts an Integer
Return Value a RenderTask

EntityTask.setOverlay

Inherited from RenderTask

Sets the overlay override value of this task
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 task
overload 1:
EntityTask:setOverlay(overlay)
Method Property Fluent Description Representation
overlay accepts a Vector2
Return Value a RenderTask
overload 2:
EntityTask:setOverlay(whiteOverlay, hurtOverlay)
Method Property Fluent Description Representation
whiteOverlay accepts an Integer
hurtOverlay accepts an Integer
Return Value a RenderTask

EntityTask.getOverlay

Inherited from RenderTask

Returns the overlay override value of this task
overload 1:
EntityTask:getOverlay()
Method Property Fluent Description Representation
Return Value a Vector2

EntityTask.getPos

Inherited from RenderTask

Gets this task position
overload 1:
EntityTask:getPos()
Method Property Fluent Description Representation
Return Value a Vector3

EntityTask.getRot

Inherited from RenderTask

Gets this task rotation
overload 1:
EntityTask:getRot()
Method Property Fluent Description Representation
Return Value a Vector3

EntityTask.getPositionMatrixRaw

Inherited from RenderTask

Returns the position matrix for this render task
The Raw version of the function is different in that it doesn't recalculate the matrix before getting it
overload 1:
EntityTask:getPositionMatrixRaw()
Method Property Fluent Description Representation
Return Value a Matrix4

EntityTask.getScale

Inherited from RenderTask

Gets this task scale
overload 1:
EntityTask:getScale()
Method Property Fluent Description Representation
Return Value a Vector3

EntityTask.scale

Inherited from RenderTask

Sets the scale of the task, relative to its attached part
overload 1:
EntityTask:scale(scale)
Method Property Fluent Description Representation
scale accepts a Vector3
Return Value a RenderTask
overload 2:
EntityTask:scale(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a RenderTask

EntityTask.visible

Inherited from RenderTask

Sets whether or not this task should be rendered
overload 1:
EntityTask:visible(visible)
Method Property Fluent Description Representation
visible accepts a Boolean
Return Value a RenderTask

EntityTask.pos

Inherited from RenderTask

Sets the position of the task, relative to its attached part
Uses model coordinates
overload 1:
EntityTask:pos(pos)
Method Property Fluent Description Representation
pos accepts a Vector3
Return Value a RenderTask
overload 2:
EntityTask:pos(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a RenderTask

EntityTask.matrix

Inherited from RenderTask

Sets the given matrix as the position matrix for this render task
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 render task
If you call setPos() or a similar function,
the effects of setMatrix() will be overwritten
overload 1:
EntityTask:matrix(matrix)
Method Property Fluent Description Representation
matrix accepts a Matrix4
Return Value a RenderTask

EntityTask.rot

Inherited from RenderTask

Sets the rotation of the task, relative to its attached part
overload 1:
EntityTask:rot(rot)
Method Property Fluent Description Representation
rot accepts a Vector3
Return Value a RenderTask
overload 2:
EntityTask:rot(x, y, z)
Method Property Fluent Description Representation
x accepts a Number
y accepts a Number
z accepts a Number
Return Value a RenderTask

EntityTask.light

Inherited from RenderTask

Sets the light override value of this task
Values are given from 0 to 15,
indicating the block light and sky light levels you want to use
Passing nil will reset the lighting override for this task
overload 1:
EntityTask:light(light)
Method Property Fluent Description Representation
light accepts a Vector2
Return Value a RenderTask
overload 2:
EntityTask:light(blockLight, skyLight)
Method Property Fluent Description Representation
blockLight accepts an Integer
skyLight accepts an Integer
Return Value a RenderTask

EntityTask.overlay

Inherited from RenderTask

Sets the overlay override value of this task
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 task
overload 1:
EntityTask:overlay(overlay)
Method Property Fluent Description Representation
overlay accepts a Vector2
Return Value a RenderTask
overload 2:
EntityTask:overlay(whiteOverlay, hurtOverlay)
Method Property Fluent Description Representation
whiteOverlay accepts an Integer
hurtOverlay accepts an Integer
Return Value a RenderTask
a a