Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Render

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

Hierarchy

  • Render

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

getId

  • getId(): number
  • Returns number

    render id that can be used to set render to the mob, animation or block

getModel

getPart

  • Parameters

    • partName: string

      full name of the part separated by "."

    Returns ModelPart

    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.

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: PartElement[]

      array of part data objects to be applied to the part

    • params: PartParameters

      specifies all the parameters of the part

    Returns void

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 void

setTextureResolution

  • setTextureResolution(...params: any): void

transform

Generated using TypeDoc