Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Render

Class that is used to give mobs, animations and blocks custom shape.

Hierarchy

  • Render

Callable

  • Render(params: any): any
  • Class that is used to give mobs, animations and blocks custom shape.

    Parameters

    • params: any

    Returns any

Index

Constructors

constructor

  • Creates a new Render instance with specified parameters

    Parameters

    • Optional parameters: RenderParameters | string | number

      specifies all the properties of the object. If it is a number, vanilla render id is used, if it is a string, used as RenderParameters.name name property

    Returns Render

Methods

addPart

  • Adds a part to the render by its full name. The part should be descendent of one of the six default parts, see ModelPart for details.

    Parameters

    • partName: string

      full name of the part separated by "."

    • Optional partParams: PartParameters

      specifies all the parameters of the part

    Returns ModelPart

    newly created part

getID

  • getID(): number
  • Returns render id that can be used to set render to the mob, animation or block.

    Returns number

getId

  • getId(): number

getModel

getPart

  • Returns a part of the render by its full name. By default, there are six parts available to the user. However, you can create your own parts that suit your needs and get them by their names.

    Parameters

    • partName: string

      full name of the part separated by "."

    Returns ModelPart

    part of the render with specified full name

getRenderType

  • getRenderType(): number

setPart

  • Sets the content and all properties of the part by its full name.

    Parameters

    • name: string

      full name of the part separated by "."

    • data: PartObject[]

      array of part data objects to be applied to the part

    • params: PartParameters

      specifies all the parameters of the part

    Returns never

setPartParams

  • Sets all the properties of the part by its full name.

    Parameters

    • partName: string

      full name of the part separated by "."

    • Optional partParams: PartParameters

      specifies all the parameters of the part

    Returns never

Generated using TypeDoc