Class BlockState

Class to work with vanilla blocks parameters.

2.2.1b89

Implements

Constructors

  • 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;
      }
      • [key: number]: number

    Returns BlockState

Methods

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

    Parameters

    • states: object

    Returns BlockState

    BlockState object itself.

    2.2.1b102

  • Adds states to the following object from given map instance.

    Parameters

    • states: Map<unknown, number>

    Returns BlockState

    BlockState object itself.

    2.2.1b102

  • Parameters

    • object: any

    Returns boolean

    Whether the following object is equal to given, according to different parameters.

  • Returns {
        [key: string]: number;
    }

    All named states from following object in JS object instance.

    • [key: string]: number
  • Returns number

    ID of the blockstate in runtime.

  • Parameters

    • state: number

    Returns number

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

  • Returns {
        [key: string]: number;
    }

    All states from following object in JS object instance.

    • [key: string]: number
  • Parameters

    • state: number

    Returns boolean

    Whether the state by given number is present in the following object.

  • Returns boolean

    Whether the state is valid.

Properties

data: number

Data of the block.

id: number

Numeric ID of the block.

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.