Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ItemModel

Class representing item model in player's hand and/or inventory. To get an instance of this class from yout code, use ItemModel.getFor static function. The coordinates of the full block in player's hand or inventory is (0, 0, 0), (1, 1, 1), so it is generally recommended to use the models that fit that bound at least for the inventory Namespace used to change item models in player's hand and/or inventory. By default, if the block has an ICRender, it is automatically applied as item's model

Hierarchy

  • ItemModel

Index

Methods

isEmpty

  • isEmpty(): boolean

overridesHand

  • overridesHand(): boolean
  • Returns boolean

    true, if this item model overrides the default model in player's hand

overridesUi

  • overridesUi(): boolean
  • Returns boolean

    true, if this item model overrides the default model in player's inventory

setHandMaterial

  • setHandMaterial(texture: string): ItemModel
  • Sets item model's material only in player's hand

    Parameters

    • texture: string

      material name to be used for the model

    Returns ItemModel

setHandModel

setHandTexture

  • Sets item model's texture only in player's hand

    Parameters

    • texture: string

      texture name to be used for the model

    Returns ItemModel

setMaterial

setModel

setTexture

  • Sets item model's texture in both player's invantory and in hand

    Parameters

    • texture: string

      texture name to be used for the model

    Returns ItemModel

setUiMaterial

  • Sets item model's material only in player's inventory

    Parameters

    • texture: string

      material name to be used for the model

    Returns ItemModel

setUiModel

setUiTexture

  • Sets item model's texture only in player's inventory

    Parameters

    • texture: string

      texture name to be used for the model

    Returns ItemModel

Static getFor

  • getFor(id: number, data: number): ItemModel

Generated using TypeDoc