Animated Texture Support

This commit is contained in:
Kam committed 2026-02-28 18:34:21 -05:00
1 parent 988dbe0cd2
commit de2fcea154
17 files changed
+578 -21

No files matched your search

@@ -147,6 +147,33 @@ public abstract class ScriptCustomizableItem extends ScriptItemStack implements
return this.itemDisplay.translateZ != null ? this.itemDisplay.translateZ : 0;
}
public Boolean isTextureAnimated() {
return this.itemDisplay.animated != null ? this.itemDisplay.animated : false;
}
public void setTextureAnimated(Boolean animated) {
this.itemDisplay.animated = animated;
saveItemData();
}
public Integer getFrameCount() {
return this.itemDisplay.frameCount != null ? this.itemDisplay.frameCount : 1;
}
public void setFrameCount(Integer frameCount) {
this.itemDisplay.frameCount = frameCount != null ? Math.max(1, frameCount) : 1;
saveItemData();
}
public Integer getFrameTime() {
return this.itemDisplay.frametime != null ? this.itemDisplay.frametime : 2;
}
public void setFrameTime(Integer frametime) {
this.itemDisplay.frametime = frametime != null ? Math.max(1, frametime) : 2;
saveItemData();
}
public NBTTagCompound getMCNbt() {
NBTTagCompound compound = super.getMCNbt();
compound.setTag("ItemData", this.getItemNBT(new NBTTagCompound()));