Linked Item Things

This commit is contained in:
Kam committed 2025-02-15 19:37:25 -05:00
1 parent 1ca70be090
commit 025e1ada3c
10 files changed
+624 -230

No files matched your search

@@ -470,15 +470,7 @@ public class NpcAPI extends AbstractNpcAPI {
if (scriptItemCache.containsKey(itemstack)) {
scriptStack = scriptItemCache.get(itemstack).getObject();
} else {
LinkedItem linkedItem;
if (itemstack.hasTagCompound()) {
int linkedItemId = itemstack.getTagCompound().getInteger(LinkedItem.LINKED_NBT_TAG);
linkedItem = LinkedItemController.Instance().get(linkedItemId);
} else {
linkedItem = null;
}
if (linkedItem != null && itemstack.getItem() instanceof ItemLinked) {
if (itemstack.getItem() instanceof ItemLinked) {
scriptStack = new ScriptLinkedItem(itemstack);
} else if (itemstack.getItem() instanceof ItemScripted) {
scriptStack = new ScriptCustomItem(itemstack);