diff --git a/java/noppes/npcs/api/gui/ITexturedRect.java b/java/noppes/npcs/api/gui/ITexturedRect.java index 75f6f63..98553d8 100644 --- a/java/noppes/npcs/api/gui/ITexturedRect.java +++ b/java/noppes/npcs/api/gui/ITexturedRect.java @@ -81,4 +81,35 @@ public interface ITexturedRect extends ICustomGuiComponent { * @return this textured rectangle instance. */ ITexturedRect setTextureOffset(int textureX, int textureY); + + /** + * Returns whether this textured rect has animation enabled. + * + * @return true if animated. + */ + boolean isAnimated(); + + /** + * Returns the number of animation frames. + * + * @return the frame count. + */ + int getFrameCount(); + + /** + * Returns the ticks per animation frame. + * + * @return the frame time in ticks. + */ + int getFrameTime(); + + /** + * Enables animation on this textured rect using a vertical sprite strip. + * The texture PNG should contain frames stacked vertically. + * + * @param frameCount number of frames in the strip. + * @param frametime ticks per frame (1 tick = 50ms). + * @return this textured rectangle instance. + */ + ITexturedRect setAnimation(int frameCount, int frametime); } diff --git a/java/noppes/npcs/api/handler/data/ICustomEffect.java b/java/noppes/npcs/api/handler/data/ICustomEffect.java index 6b0b6fd..e180049 100644 --- a/java/noppes/npcs/api/handler/data/ICustomEffect.java +++ b/java/noppes/npcs/api/handler/data/ICustomEffect.java @@ -51,6 +51,18 @@ public interface ICustomEffect { * Index: 1 - DBC Addon */ int getIndex(); + + boolean isAnimated(); + + void setAnimated(boolean animated); + + int getFrameCount(); + + void setFrameCount(int frameCount); + + int getFrameTime(); + + void setFrameTime(int frametime); } diff --git a/java/noppes/npcs/api/item/IItemCustomizable.java b/java/noppes/npcs/api/item/IItemCustomizable.java index c085052..29faa50 100644 --- a/java/noppes/npcs/api/item/IItemCustomizable.java +++ b/java/noppes/npcs/api/item/IItemCustomizable.java @@ -245,4 +245,46 @@ public interface IItemCustomizable extends IItemStack { * @return The Z-axis translation */ Float getTranslateZ(); + + /** + * Returns whether the item texture has animation enabled. + * + * @return True if the texture is animated, false otherwise + */ + Boolean isTextureAnimated(); + + /** + * Sets whether the item texture should be animated. + * + * @param animated True to enable animation + */ + void setTextureAnimated(Boolean animated); + + /** + * Gets the number of animation frames in the texture strip. + * + * @return The frame count + */ + Integer getFrameCount(); + + /** + * Sets the number of animation frames. + * + * @param frameCount The frame count + */ + void setFrameCount(Integer frameCount); + + /** + * Gets the ticks per animation frame. + * + * @return The frame time in ticks + */ + Integer getFrameTime(); + + /** + * Sets the ticks per animation frame. + * + * @param frametime The frame time in ticks + */ + void setFrameTime(Integer frametime); }