Render
Index
Constructors
constructor
Creates a new Render instance with specified parameters.
Parameters
optionalparameters: string | number | RenderParameters
specifies all the properties of the object. If it is a number, vanilla render ID is used, if it is a string, used as RenderParameters.name name property
Returns Render
Properties
readonlyisChangeable
readonlyisEmpty
readonlymodel
readonlypartsinternal
Type declaration
[key string]: Render.ModelPart
readonlyrenderId
readonlyrenderer
Methods
_setPartRecursive
- internal
Parameters
part: ModelPart
data: PartElement[]
coords: Vector
Returns void
addPart
Adds a part to the render by it's full name. The part should be descendent of one of the six default parts, see ModelPart for details.
Parameters
partName: string
full name of the part separated by "."
optionalpartParams: PartParameters
specifies all the parameters of the part
Returns ModelPart
Newly created part.
checkChangeable
Returns void
fromCache
Parameters
data: Cache
Returns void
getID
Returns number
Render identifier that can be used to set render to the mob, animation or block.
getId
Returns number
Render identifier that can be used to set render to the mob, animation or block.
getModel
Returns Model
Render's model that defines it's visual shape.
getPart
Parameters
partName: string
full name of the part separated by "."
Returns ModelPart
A part of the render by it's full name. By default, there are six parts available to the user. However, you can create your own parts that suit your needs and get them by their names.
getRenderType
Returns number
Render identifier that can be used to set render to the mob, animation or block.
init
Specifies additional params for the following Render.
Parameters
optionalparams: string | number | RenderParameters
specifies all the properties of the object. If it is a number, vanilla render ID is used, if it is a string, used as RenderParameters.name name property
Returns void
initModel
Returns void
loadInitialState
Parameters
name: string
Returns void
loadState
Parameters
name: string
isLocal: boolean
Returns void
rebuild
Returns void
saveState
Parameters
name: string
isLocal: boolean
Returns void
saveToNext
Parameters
name: string
isLocal: boolean
Returns void
setPart
Sets the content and all properties of the part by it's full name.
Parameters
name: string
full name of the part separated by "."
data: PartElement[]
array of part data objects to be applied to the part
params: PartParameters
specifies all the parameters of the part
Returns void
setPartParams
Sets all the properties of the part by it's full name.
Parameters
partName: string
full name of the part separated by "."
optionalpartParams: PartParameters
specifies all the parameters of the part
Returns void
setTextureResolution
Parameters
rest...params: any
Returns void
toCache
Returns Cache
transform
Returns Transform
Transform object used to manipulate current render.
Class that is used to give mobs, animations and blocks custom shape.