Added ItemCustomizable abstract class which both scripted and linked items extend from. Common behavior between the classes should move there.

This commit is contained in:
luisc committed 2025-02-13 18:16:53 -06:00
1 parent 44e5c8b4c5
commit d9e6372acb
3 files changed
+11 -8

No files matched your search

@@ -22,7 +22,7 @@ import noppes.npcs.scripted.item.ScriptCustomItem;
import noppes.npcs.scripted.item.ScriptLinkedItem;
import org.lwjgl.opengl.GL11;
public class ItemLinked extends Item implements ItemRenderInterface {
public class ItemLinked extends ItemCustomizable {
public ItemLinked() {
maxStackSize = 1;
@@ -151,9 +151,6 @@ public class ItemLinked extends Item implements ItemRenderInterface {
return super.getItemUseAction(stack);
}
@Override
public void renderSpecial() {}
public void renderOffset(ScriptLinkedItem scriptCustomItem) {
GL11.glTranslatef(0.135F * scriptCustomItem.itemDisplay.scaleX, 0.2F * scriptCustomItem.itemDisplay.scaleY, 0.07F * scriptCustomItem.itemDisplay.scaleZ);
}