Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace BlockRenderer

Module used to create blocks with any custom model

Index

Type Aliases

ModelTextureSet: [string, number][]

Type used to describe a new model for BlockRenderer

Functions

  • 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(id: number, data: number, icRender: 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: ICRender.Model

      default model for the block

    Returns void

  • 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(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(x: number, y: number, z: number, icRender: ICRender.Model, preventRebuild?: boolean): void
  • Changes shape of the block on the specified coordinates

    Parameters

    • x: number
    • y: number
    • z: number
    • icRender: 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

  • mapCollisionAndRaycastModelAtCoords(dimension: number, x: number, y: number, z: number, shape: CollisionShape): void
  • mapCollisionModelAtCoords(dimension: number, x: number, y: number, z: number, shape: CollisionShape): void
  • mapRaycastModelAtCoords(dimension: number, x: number, y: number, z: number, shape: CollisionShape): void
  • setCustomCollisionAndRaycastShape(id: number, data: number, shape: CollisionShape): void
  • 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(id: number, data: number, shape: CollisionShape): void
  • setCustomRaycastShape(id: number, data: number, shape: CollisionShape): void
  • 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(id: number, data: number, icRender: 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: ICRender.Model

      ICRender.Model object to be used as static block shape

    Returns void

  • 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

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

Generated using TypeDoc