mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 04:57:27 +00:00
Linked Item Things
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user