Item animations are used to display items or blocks models in the world.

Hierarchy (view full)

Constructors

Methods

  • Creates render if it was not previously created and applies all the parameters from animation description.

    Returns void

  • Describes animation parameters for the future use. Call load or loadCustom to actually launch the animation.

    Parameters

    • description: {
          material?: string;
          mesh?: RenderMesh;
          render?: number;
          scale?: number;
          skin?: string;
      }

      an object containing all the required data about animation

      • Optionalmaterial?: string

        Animation material, can be used to apply custom materials to the animation.

        2.0.2b20

      • Optionalmesh?: RenderMesh

        RenderMesh object to be displayed with animation.

        2.0.2b20

      • Optionalrender?: number

        Numeric ID of the Render object to be displayed with animation. Can be obtained using Render.getId

      • Optionalscale?: number

        Animation scale.

        1
        
      • Optionalskin?: string

        Name of the texture to be used as render's skin.

    Returns void

  • Describes item to be used for the animation.

    Parameters

    • item: {
          count?: number;
          data?: number;
          extra?: ItemExtraData;
          glint?: boolean;
          id: number;
          material?: string;
          notRandomize?: boolean;
          rotation?: string | [number, number, number];
          size?: number;
          skin?: string;
      }

      item parameters object

      • Optionalcount?: number

        Item count, will be transform to display an appropriate animation.

      • Optionaldata?: number

        Item data.

      • Optionalextra?: ItemExtraData

        Item extra.

      • Optionalglint?: boolean

        Whether the item should be in glint state or not.

      • id: number

        Item ID.

      • Optionalmaterial?: string

        Shader material name.

        2.0.2b20

      • OptionalnotRandomize?: boolean

        If true, the position of the item will not be randomized.

      • Optionalrotation?: string | [number, number, number]

        If string "x" is passed, the item is rotated 90 along x axis, if "z" is passed, the item is rotated 90 along z axis, otherwise the item is rotated according to the rotation array along all the three axes.

      • Optionalsize?: number

        Item/block size.

        0.5
        
      • Optionalskin?: string

        Skin name to be used for the render. If no skin is passed, default item skin is used.

    Returns void

  • Returns void

    Backwards compatibility, render doesn't have attributes.

  • Creates a set of transformations for the current animation.

    Parameters

    • transformations: {
          name: string;
          params: any[];
      }[]
    • noClear: boolean

    Returns void

  • Sets specified coordinates as light measuring position for the animation. In other words, animation lightning will be calculated as if animation was at the specified coordinates.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • Specifies item rotation along the three axes.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

    x: 0, y: 0, z: 0
    
  • Specifies item size.

    Parameters

    • size: number

    Returns void

    0.5
    
  • Specifies item size and rotation via single function call.

    Parameters

    • size: number
    • x: number
    • y: number
    • z: number

    Returns void

  • Changes the animation's position.

    Parameters

    • x: number
    • y: number
    • z: number

    Returns void

  • Sets light measuring position to always match day/night lightning, even when the animation is not directly illuminated.

    Returns void

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