Options
All
  • Public
  • Public/Protected
  • All
Menu

Class to work with vanilla blocks parameters

Hierarchy

  • BlockState

Implements

Index

Constructors

  • new BlockState(id: number, data: number): BlockState
  • new BlockState(id: number, scriptable: {}): BlockState
  • Constructs new BlockState object from given id and data

    Parameters

    • id: number
    • data: number

    Returns BlockState

  • Constructs new BlockState object from given id and states object

    Parameters

    • id: number
    • scriptable: {}
      • [key: number]: number

    Returns BlockState

Properties

data: number

Data of the block

id: number

Numeric ID of the block

Methods

  • addState(state: number, value: number): BlockState
  • Adds states to the following object from given java.util.Map instance

    Parameters

    • states: Map<unknown, number>

    Returns BlockState

    BlockState object itself

  • Adds states to the following object from given JS object instance

    Parameters

    • states: object

    Returns BlockState

    BlockState object itself

  • equals(object: any): boolean
  • Parameters

    • object: any

    Returns boolean

    whether the following object is equal to given, according to different parameters

  • getData(): number
  • getId(): number
  • getNamedStates(): Map<string, number>
  • Returns Map<string, number>

    all NAMED states from following object in java.util.Map instance

  • getNamedStatesScriptable(): {}
  • Returns {}

    all NAMED states from following object in JS object instance

    • [key: string]: number
  • getRuntimeId(): number
  • getState(state: number): number
  • Parameters

    • state: number

    Returns number

    state of the given number if it's present in the following object

  • getStates(): Map<number, number>
  • Returns Map<number, number>

    all states from following object in java.util.Map instance

  • getStatesScriptable(): {}
  • Returns {}

    all states from following object in JS object instance

    • [key: string]: number
  • hasState(state: number): boolean
  • Parameters

    • state: number

    Returns boolean

    whether the state by given number is present in the following object

  • isValidState(): boolean
  • toString(): string

Generated using TypeDoc