Class Render

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

Constructors

  • Creates a new Render instance with specified parameters.

    Parameters

    • Optionalparameters: string | number | RenderParameters

      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

  • Adds a part to the render by it's 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 "."

    • OptionalpartParams: PartParameters

      specifies all the parameters of the part

    Returns Render.ModelPart

    Newly created part.

  • Parameters

    Returns void

    Unavailable feature, renderers must be saved independently.

  • Returns number

    Render identifier that can be used to set render to the mob, animation or block.

  • Returns number

    Render identifier that can be used to set render to the mob, animation or block.

  • Parameters

    • partName: string

      full name of the part separated by "."

    Returns Render.ModelPart

    A part of the render by it's 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.

  • Returns number

    Render identifier that can be used to set render to the mob, animation or block.

  • Specifies additional params for the following Render.

    Parameters

    • Optionalparams: string | number | RenderParameters

      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 void

  • Parameters

    • name: string

    Returns void

    Unavailable feature, renderers must be saved independently.

  • Parameters

    • name: string
    • isLocal: boolean

    Returns void

    Unavailable feature, renderers must be saved independently.

  • Parameters

    • name: string
    • isLocal: boolean

    Returns void

    Unavailable feature, renderers must be saved independently.

  • Parameters

    • name: string
    • isLocal: boolean

    Returns void

    Unavailable feature, renderers must be saved independently.

  • Sets the content and all properties of the part by it's 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

  • Sets all the properties of the part by it's full name.

    Parameters

    • partName: string

      full name of the part separated by "."

    • OptionalpartParams: PartParameters

      specifies all the parameters of the part

    Returns void

  • Parameters

    • Rest...params: any

    Returns void

    Does nothing, not required anymore.

  • Returns Cache

    Unavailable feature, renderers must be saved independently.

Properties

isChangeable: boolean
isEmpty: boolean
model: Render.Model
parts: {
    [key: string]: Render.ModelPart;
}
renderer: Renderer
renderId: number

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