Skip to main content

ICRender

Class used to define block models that depend on surrounding blocks. Some examples of such blocks are wires, pipes, block structure parts, etc.

Index

Variables

constMODE_EXCLUDE

MODE_EXCLUDE: 1 = 1

Used to specify that the block should be absent to satisfy condition.

constMODE_INCLUDE

MODE_INCLUDE: 0 = 0

Used to specify that the block should be present to satisfy condition.

Functions

AND

BLOCK

  • BLOCK(x: number, y: number, z: number, group: Group, exclude: boolean): CONDITION
  • Constructs new ICRender.BLOCK condition.


    Parameters

    • x: number

      is relative x coordinate

    • y: number

      is relative y coordinate

    • z: number

      is relative z coordinate

    • group: Group

      blocks group to check the condition for

    • exclude: boolean

      if true, the blocks from the group make the condition evaluate as false, as true otherwise

    Returns CONDITION

BlockState

  • BlockState(x: number, y: number, z: number, state: number, value: number): CONDITION
  • BlockState(state: number, value: number): CONDITION
  • since: 2.3.1b116

    Constructs new ICRender.BlockState condition that uses block state data (it must match the value) to display.


    Parameters

    • x: number

      is relative x coordinate

    • y: number

      is relative y coordinate

    • z: number

      is relative z coordinate

    • state: number

      one of EBlockStates values or custom one of relative block

    • value: number

      value to match selected state

    Returns CONDITION

NOT

OR

RANDOM

  • since: 2.0.2b23

    Constructs new ICRender.RANDOM_CONDITION condition.


    Parameters

    • value: number

      value that a generated random integer number should be for the condition to evaluate as true

    • max: number

      maximum value for the generator

    • optionalseed: number

      seed to be used for random numbers generation

    Returns RANDOM_CONDITION

getGroup

  • Parameters

    • name: string

      group name

    Returns ICRender.Group

    Block group by it's name, if no group with specified name exist, this function creates a new one.

getUnnamedGroup