Interface IGeckoAnimatable

    • Method Detail

      • getModel

        String getModel()
        Get the geo model resource location.
        Returns:
        the model resource location string
      • setModel

        void setModel​(String model)
        Set the GeckoLib geo model resource location.
        Parameters:
        model - the model resource location (e.g. "geckolib3:geo/npc.geo.json")
      • getTexture

        String getTexture()
        Get the texture resource location.
        Returns:
        the texture resource location string
      • setTexture

        void setTexture​(String texture)
        Set the texture resource location.
        Parameters:
        texture - the texture resource location (e.g. "geckolib3:textures/model/npc.png")
      • getAnimationFile

        String getAnimationFile()
        Get the animation file resource location.
        Returns:
        the animation file resource location string
      • setAnimationFile

        void setAnimationFile​(String animationFile)
        Set the animation file resource location.
        Parameters:
        animationFile - the animation file resource location (e.g. "geckolib3:animations/npc.animation.json")
      • getIdleAnimation

        String getIdleAnimation()
        Get the idle animation name.
        Returns:
        the idle animation name, or an empty string if none is set
      • setIdleAnimation

        void setIdleAnimation​(String animation)
        Set the idle animation name. This animation plays continuously while the entity is standing still.
        Parameters:
        animation - the animation name (e.g. "animation.npc.idle")
      • getWalkAnimation

        String getWalkAnimation()
        Get the walk animation name.
        Returns:
        the walk animation name, or an empty string if none is set
      • setWalkAnimation

        void setWalkAnimation​(String animation)
        Set the walk animation name. This animation plays while the entity is moving.
        Parameters:
        animation - the animation name (e.g. "animation.npc.walk")
      • getHurtAnimation

        String getHurtAnimation()
        Get the hurt animation name.
        Returns:
        the hurt animation name, or an empty string if none is set
      • setHurtAnimation

        void setHurtAnimation​(String animation)
        Set the hurt animation name. This animation plays when the entity takes damage.
        Parameters:
        animation - the animation name (e.g. "animation.npc.hurt")
      • getMeleeAttackAnimation

        String getMeleeAttackAnimation()
        Get the melee attack animation name.
        Returns:
        the melee attack animation name, or an empty string if none is set
      • setMeleeAttackAnimation

        void setMeleeAttackAnimation​(String animation)
        Set the melee attack animation name. This animation plays when the entity performs a melee attack.
        Parameters:
        animation - the animation name (e.g. "animation.npc.melee")
      • getRangedAttackAnimation

        String getRangedAttackAnimation()
        Get the ranged attack animation name.
        Returns:
        the ranged attack animation name, or an empty string if none is set
      • setRangedAttackAnimation

        void setRangedAttackAnimation​(String animation)
        Set the ranged attack animation name. This animation plays when the entity performs a ranged attack.
        Parameters:
        animation - the animation name (e.g. "animation.npc.ranged")
      • getHeadBoneName

        String getHeadBoneName()
        Get the bone name used for head tracking and rotation.
        Returns:
        the head bone name (default: "head")
      • setHeadBoneName

        void setHeadBoneName​(String boneName)
        Set the bone name used for head tracking and rotation. The bone must exist in the assigned model file.
        Parameters:
        boneName - the bone name as defined in the model
      • getTransitionLengthTicks

        int getTransitionLengthTicks()
        Get the transition duration between animations in ticks.
        Returns:
        the transition length in ticks (default: 10)
      • setTransitionLengthTicks

        void setTransitionLengthTicks​(int ticks)
        Set the transition duration between animations in ticks. Controls how smoothly one animation blends into the next.
        Parameters:
        ticks - the transition length in ticks (20 ticks = 1 second)