BlockRenderer
Index
Classes
Interfaces
Type Aliases
Functions
- addRenderCallback
- createModel
- createTexturedBlock
- createTexturedBox
- disableCustomRender
- enableCoordMapping
- enableCustomRender
- forceRenderRebuild
- mapAtCoords
- mapCollisionAndRaycastModelAtCoords
- mapCollisionModelAtCoords
- mapRaycastModelAtCoords
- setCustomCollisionAndRaycastShape
- setCustomCollisionShape
- setCustomRaycastShape
- setStaticICRender
- unmapAtCoords
- unmapCollisionAndRaycastModelAtCoords
- unmapCollisionModelAtCoords
- unmapRaycastModelAtCoords
Type Aliases
ModelTextureSet
Type used to describe a new model for BlockRenderer.
Functions
addRenderCallback
Adds "CustomBlockTessellation" callback function for specified block ID.
Parameters
id: number
block ID
callback: CustomBlockTessellationFunction
function to be called when the event occurs
Returns void
createModel
Creates a new empty block model.
Returns BlockRenderer.Model
Empty block model.
createTexturedBlock
Constructs new block model of specified simple block of the normal block size shape with specified textures.
Parameters
descr: ModelTextureSet
texture set used for the box
Returns BlockRenderer.Model
createTexturedBox
Constructs new block model of specified simple block shape with specified textures.
Parameters
x1: number
y1: number
z1: number
x2: number
y2: number
z2: number
descr: ModelTextureSet
texture set used for the box
Returns BlockRenderer.Model
disableCustomRender
Disables custom rendering for the specified block.
Parameters
id: number
block ID
data: number
block data or -1 to map all the data values
Returns void
enableCoordMapping
Enables block mapping for the specified block.
Parameters
id: number
block ID
data: number
block data or -1 to map all the data values
icRender: Model
default model for the block
Returns void
enableCustomRender
Enables custom rendering for the specified block.
Parameters
id: number
block ID
data: number
block data or -1 to map all the data values
Returns void
forceRenderRebuild
Forces block renders to be rebuilt immediately.
Parameters
x: number
y: number
z: number
mode: number
if 0 is passed, only the specified block gets rebuilt, if 1 is passed, all the blocks along y axes are rebuilt
Returns void
mapAtCoords
Changes shape of the block on the specified coordinates.
Parameters
x: number
y: number
z: number
icRender: Model
ICRender.Model object to be displayed at the coordinates
optionalpreventRebuild: boolean
if false or not specified, rebuild is performed immediately
Returns void
mapCollisionAndRaycastModelAtCoords
- since: 2.1.0b59
Changes both collision and raycast shape of the block on given coords in given dimension.
Parameters
dimension: number
x: number
y: number
z: number
shape: CollisionShape
ICRender.CollisionShape object to be used as new collision and raycast shape
Returns void
mapCollisionModelAtCoords
- since: 2.1.0b59
Changes collision shape of the block on given coords in given dimension.
Parameters
dimension: number
x: number
y: number
z: number
shape: CollisionShape
ICRender.CollisionShape object to be used as new collision shape
Returns void
mapRaycastModelAtCoords
- since: 2.1.0b59
Changes raycast shape of the block on given coords in given dimension.
Parameters
dimension: number
x: number
y: number
z: number
shape: CollisionShape
ICRender.CollisionShape object to be used as new raycast shape
Returns void
setCustomCollisionAndRaycastShape
- since: 2.1.0b59
Specifies custom collision and raycast shape for the block.
Parameters
id: number
block ID
data: number
block data or -1 to map all the data values
shape: CollisionShape
ICRender.CollisionShape object to be used as default collision and raycast shape for the specified block
Returns void
setCustomCollisionShape
- since: 2.1.0b59
Specifies custom collision shape for the block.
Parameters
id: number
block ID
data: number
block data
shape: CollisionShape
ICRender.CollisionShape object to be used as default collision shape for the specified block
Returns void
setCustomRaycastShape
- since: 2.1.0b59
Specifies custom raycast shape for the block.
Parameters
id: number
block ID
data: number
block data or -1 to map all the data values
shape: CollisionShape
ICRender.CollisionShape object to be used as default raycast shape for the specified block
Returns void
setStaticICRender
Sets static ICRender model as block render shape.
Parameters
id: number
block ID
data: number
block data or -1 to map all the data values
icRender: Model
ICRender.Model object to be used as static block shape
Returns void
unmapAtCoords
Resets shape of the block to default on the specified coordinates.
Parameters
x: number
y: number
z: number
optionalpreventRebuild: boolean
if false or not specified, rebuild is performed immediately
Returns void
unmapCollisionAndRaycastModelAtCoords
- since: 2.1.0b59
Resets both collision and raycast shape of the block to default on given coords in given dimension.
Parameters
dimension: number
x: number
y: number
z: number
Returns void
unmapCollisionModelAtCoords
- since: 2.1.0b59
Resets collision shape of the block to default on given coords in given dimension.
Parameters
dimension: number
x: number
y: number
z: number
Returns void
unmapRaycastModelAtCoords
- since: 2.1.0b59
Resets raycast shape of the block to default on given coords in given dimension.
Parameters
dimension: number
x: number
y: number
z: number
Returns void
Module used to create blocks with any custom model.