Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace BlockRenderer

Module used to create blocks with any custom model

Index

Type aliases

ModelTextureSet

ModelTextureSet: [string, number][]

Type used to describe a new model for BlockRenderer

Functions

addRenderCallback

createModel

createTexturedBlock

  • Constructs new block model of specified simple block of the normal block size shape with specified textures

    Parameters

    Returns Model

createTexturedBox

  • createTexturedBox(x1: number, y1: number, z1: number, x2: number, y2: number, z2: number, descr: ModelTextureSet): Model
  • 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 Model

disableCustomRender

  • disableCustomRender(id: number, data: number): void
  • 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

  • enableCoordMapping(id: number, data: number, icRender: Model): void
  • 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

  • enableCustomRender(id: number, data: number): void
  • 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

  • forceRenderRebuild(x: number, y: number, z: number, mode: number): void
  • 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

  • mapAtCoords(x: number, y: number, z: number, icRender: Model, preventRebuild?: boolean): void
  • 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

    • Optional preventRebuild: boolean

      if false or not specified, rebuild is performed immediately

    Returns void

setCustomCollisionShape

  • setCustomCollisionShape(id: number, data: number, shape: CollisionShape): void

setCustomRaycastShape

  • setCustomRaycastShape(id: number, data: number, shape: CollisionShape): void

setStaticICRender

  • setStaticICRender(id: number, data: number, icRender: Model): void
  • 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

  • unmapAtCoords(x: number, y: number, z: number, preventRebuild?: boolean): void
  • Resets shape of the block to default on the specified coordinates

    Parameters

    • x: number
    • y: number
    • z: number
    • Optional preventRebuild: boolean

      if false or not specified, rebuild is performed immediately

    Returns void

Generated using TypeDoc