Class GeckoAPI

    • Method Detail

      • getAnimatable

        public IGeckoAnimatable getAnimatable​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc)
        Description copied from class: AbstractGeckoAPI
        Get the animation configuration interface for an NPC.
        Specified by:
        getAnimatable in class AbstractGeckoAPI
        Parameters:
        npc - The NPC to get animation config for
        Returns:
        The animatable interface for this NPC
      • getAnimationList

        public String[] getAnimationList​(String animationFile)
        Description copied from class: AbstractGeckoAPI
        Get a list of all animation names in an animation file.
        Specified by:
        getAnimationList in class AbstractGeckoAPI
        Parameters:
        animationFile - The animation file resource location (e.g. "npcgecko:animations/geo_npc.animation.json")
        Returns:
        Array of animation names, or empty array if file not found
      • getAnimation

        public IGeckoAnimation getAnimation​(String animationFile,
                                            String animationName)
        Description copied from class: AbstractGeckoAPI
        Get animation metadata from a loaded animation file.
        Specified by:
        getAnimation in class AbstractGeckoAPI
        Parameters:
        animationFile - The animation file resource location
        animationName - The animation name within the file
        Returns:
        The animation metadata, or null if not found
      • colorOfRGB

        public IGeckoColor colorOfRGB​(int r,
                                      int g,
                                      int b)
        Description copied from class: AbstractGeckoAPI
        Create a color from RGB components.
        Specified by:
        colorOfRGB in class AbstractGeckoAPI
        Parameters:
        r - Red component (0-255)
        g - Green component (0-255)
        b - Blue component (0-255)
        Returns:
        A new color
      • colorOfRGBA

        public IGeckoColor colorOfRGBA​(int r,
                                       int g,
                                       int b,
                                       int a)
        Description copied from class: AbstractGeckoAPI
        Create a color from RGBA components.
        Specified by:
        colorOfRGBA in class AbstractGeckoAPI
        Parameters:
        r - Red component (0-255)
        g - Green component (0-255)
        b - Blue component (0-255)
        a - Alpha component (0-255)
        Returns:
        A new color
      • setModel

        public void setModel​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                             String model)
        Description copied from class: AbstractGeckoAPI
        Set the geo model resource location for an NPC.
        Specified by:
        setModel in class AbstractGeckoAPI
        Parameters:
        npc - The target NPC
        model - The model path (e.g. "geckolib3:geo/npc.geo.json")
      • setTexture

        public void setTexture​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                               String texture)
        Description copied from class: AbstractGeckoAPI
        Set the texture resource location for an NPC.
        Specified by:
        setTexture in class AbstractGeckoAPI
        Parameters:
        npc - The target NPC
        texture - The texture path
      • setAnimationFile

        public void setAnimationFile​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                                     String animation)
        Description copied from class: AbstractGeckoAPI
        Set the animation file resource location for an NPC.
        Specified by:
        setAnimationFile in class AbstractGeckoAPI
        Parameters:
        npc - The target NPC
        animation - The animation file path
      • setIdleAnimation

        public void setIdleAnimation​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                                     String animation)
        Description copied from class: AbstractGeckoAPI
        Set the idle animation name for an NPC.
        Specified by:
        setIdleAnimation in class AbstractGeckoAPI
        Parameters:
        npc - The target NPC
        animation - The animation name from the animation file
      • syncAnimForPlayer

        public void syncAnimForPlayer​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                                      IGeckoAnimationBuilder builder,
                                      IPlayer<net.minecraft.entity.player.EntityPlayerMP> player)
        Description copied from class: AbstractGeckoAPI
        Sync an animation to a specific player for an NPC.
        Specified by:
        syncAnimForPlayer in class AbstractGeckoAPI
        Parameters:
        npc - The NPC to play the animation on
        builder - The animation builder with queued animations
        player - The player to send the animation to
      • syncAnimForAll

        public void syncAnimForAll​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                                   IGeckoAnimationBuilder builder)
        Description copied from class: AbstractGeckoAPI
        Sync an animation to all players for an NPC.
        Specified by:
        syncAnimForAll in class AbstractGeckoAPI
        Parameters:
        npc - The NPC to play the animation on
        builder - The animation builder with queued animations
      • setModel

        public void setModel​(IBlockScripted scriptedBlock,
                             String model)
        Description copied from class: AbstractGeckoAPI
        Set the geo model resource location for a scripted block.
        Specified by:
        setModel in class AbstractGeckoAPI
        Parameters:
        scriptedBlock - The target block
        model - The model path
      • setTexture

        public void setTexture​(IBlockScripted scriptedBlock,
                               String texture)
        Description copied from class: AbstractGeckoAPI
        Set the texture resource location for a scripted block.
        Specified by:
        setTexture in class AbstractGeckoAPI
        Parameters:
        scriptedBlock - The target block
        texture - The texture path
      • setAnimationFile

        public void setAnimationFile​(IBlockScripted scriptedBlock,
                                     String animation)
        Description copied from class: AbstractGeckoAPI
        Set the animation file resource location for a scripted block.
        Specified by:
        setAnimationFile in class AbstractGeckoAPI
        Parameters:
        scriptedBlock - The target block
        animation - The animation file path
      • setIdleAnimation

        public void setIdleAnimation​(IBlockScripted scriptedBlock,
                                     String animation)
        Description copied from class: AbstractGeckoAPI
        Set the idle animation name for a scripted block.
        Specified by:
        setIdleAnimation in class AbstractGeckoAPI
        Parameters:
        scriptedBlock - The target block
        animation - The animation name from the animation file
      • syncAnimForPlayer

        public void syncAnimForPlayer​(IBlockScripted scriptedBlock,
                                      IGeckoAnimationBuilder builder,
                                      IPlayer<net.minecraft.entity.player.EntityPlayerMP> player)
        Description copied from class: AbstractGeckoAPI
        Sync an animation to a specific player for a scripted block.
        Specified by:
        syncAnimForPlayer in class AbstractGeckoAPI
        Parameters:
        scriptedBlock - The block to play the animation on
        builder - The animation builder with queued animations
        player - The player to send the animation to