Class AbstractGeckoAPI

  • Direct Known Subclasses:
    GeckoAPI

    public abstract class AbstractGeckoAPI
    extends Object
    • Constructor Detail

      • AbstractGeckoAPI

        public AbstractGeckoAPI()
    • Method Detail

      • IsAvailable

        public static boolean IsAvailable()
      • createAnimBuilder

        public abstract IGeckoAnimationBuilder createAnimBuilder()
        Create a new animation builder for constructing animation sequences.
        Returns:
        A new animation builder
      • createAnimationBuilder

        public abstract IGeckoAnimationBuilder createAnimationBuilder()
        Create a new animation builder for constructing animation sequences.
        Returns:
        A new animation builder
      • getAnimatable

        public abstract IGeckoAnimatable getAnimatable​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc)
        Get the animation configuration interface for an NPC.
        Parameters:
        npc - The NPC to get animation config for
        Returns:
        The animatable interface for this NPC
      • getAnimatable

        public abstract IGeckoAnimatable getAnimatable​(IBlockScripted scriptedBlock)
        Get the animation configuration interface for a scripted block.
        Parameters:
        scriptedBlock - The block to get animation config for
        Returns:
        The animatable interface for this block
      • getAnimationList

        public abstract String[] getAnimationList​(String animationFile)
        Get a list of all animation names in an animation file.
        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
      • getAnimationFileList

        public abstract String[] getAnimationFileList()
        Get a list of all loaded animation file resource locations.
        Returns:
        Array of animation file paths
      • getAnimation

        public abstract IGeckoAnimation getAnimation​(String animationFile,
                                                     String animationName)
        Get animation metadata from a loaded animation file.
        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 abstract IGeckoColor colorOfRGB​(int r,
                                               int g,
                                               int b)
        Create a color from RGB components.
        Parameters:
        r - Red component (0-255)
        g - Green component (0-255)
        b - Blue component (0-255)
        Returns:
        A new color
      • colorOfRGBA

        public abstract IGeckoColor colorOfRGBA​(int r,
                                                int g,
                                                int b,
                                                int a)
        Create a color from RGBA components.
        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 abstract void setModel​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                                      String model)
        Set the geo model resource location for an NPC.
        Parameters:
        npc - The target NPC
        model - The model path (e.g. "geckolib3:geo/npc.geo.json")
      • setTexture

        public abstract void setTexture​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                                        String texture)
        Set the texture resource location for an NPC.
        Parameters:
        npc - The target NPC
        texture - The texture path
      • setAnimationFile

        public abstract void setAnimationFile​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                                              String animation)
        Set the animation file resource location for an NPC.
        Parameters:
        npc - The target NPC
        animation - The animation file path
      • setIdleAnimation

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

        public abstract void syncAnimForPlayer​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                                               IGeckoAnimationBuilder builder,
                                               IPlayer<net.minecraft.entity.player.EntityPlayerMP> player)
        Sync an animation to a specific player for an NPC.
        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 abstract void syncAnimForAll​(ICustomNpc<noppes.npcs.entity.EntityNPCInterface> npc,
                                            IGeckoAnimationBuilder builder)
        Sync an animation to all players for an NPC.
        Parameters:
        npc - The NPC to play the animation on
        builder - The animation builder with queued animations
      • setModel

        public abstract void setModel​(IBlockScripted scriptedBlock,
                                      String model)
        Set the geo model resource location for a scripted block.
        Parameters:
        scriptedBlock - The target block
        model - The model path
      • setTexture

        public abstract void setTexture​(IBlockScripted scriptedBlock,
                                        String texture)
        Set the texture resource location for a scripted block.
        Parameters:
        scriptedBlock - The target block
        texture - The texture path
      • setAnimationFile

        public abstract void setAnimationFile​(IBlockScripted scriptedBlock,
                                              String animation)
        Set the animation file resource location for a scripted block.
        Parameters:
        scriptedBlock - The target block
        animation - The animation file path
      • setIdleAnimation

        public abstract void setIdleAnimation​(IBlockScripted scriptedBlock,
                                              String animation)
        Set the idle animation name for a scripted block.
        Parameters:
        scriptedBlock - The target block
        animation - The animation name from the animation file
      • syncAnimForPlayer

        public abstract void syncAnimForPlayer​(IBlockScripted scriptedBlock,
                                               IGeckoAnimationBuilder builder,
                                               IPlayer<net.minecraft.entity.player.EntityPlayerMP> player)
        Sync an animation to a specific player for a scripted block.
        Parameters:
        scriptedBlock - The block to play the animation on
        builder - The animation builder with queued animations
        player - The player to send the animation to
      • syncAnimForAll

        public abstract void syncAnimForAll​(IBlockScripted scriptedBlock,
                                            IGeckoAnimationBuilder builder)
        Sync an animation to all players for a scripted block.
        Parameters:
        scriptedBlock - The block to play the animation on
        builder - The animation builder with queued animations