mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 05:19:41 +00:00
Fix Linked Item Duplication Bug
This commit is contained in:
1 parent
a5f661b679
commit
fdd47691ae
5 files changed
+57
-20
No files matched your search
@@ -2,13 +2,11 @@ package noppes.npcs.controllers.data;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.nbt.NBTTagInt;
|
||||
import net.minecraftforge.common.util.Constants;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.EventHooks;
|
||||
import noppes.npcs.api.handler.data.ILinkedItem;
|
||||
import noppes.npcs.api.item.IItemStack;
|
||||
import noppes.npcs.controllers.CustomEffectController;
|
||||
import noppes.npcs.controllers.LinkedItemController;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
import noppes.npcs.scripted.item.ScriptLinkedItem;
|
||||
@@ -102,6 +100,7 @@ public class LinkedItem implements ILinkedItem {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILinkedItem save() {
|
||||
return LinkedItemController.getInstance().saveLinkedItem(this);
|
||||
}
|
||||
@@ -110,6 +109,7 @@ public class LinkedItem implements ILinkedItem {
|
||||
LinkedItemController.getInstance().linkedItemsScripts.put(this.id, handler);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemStack createStack() {
|
||||
LinkedItem copy = this.clone();
|
||||
ItemStack stack = new ItemStack(CustomItems.linked_item, 1);
|
||||
|
||||
Reference in new issue
Block a user