Linked Item Saving & Writing

This commit is contained in:
Kam committed 2025-02-17 14:38:42 -05:00
1 parent 85165070e0
commit 5cbab2581c
7 files changed
+36 -20

No files matched your search

@@ -197,14 +197,14 @@ public class ScriptLinkedItem extends ScriptCustomizableItem implements IItemLin
public NBTTagCompound getItemNBT(NBTTagCompound compound) {
this.itemDisplay.writeToNBT(compound);
compound.setTag(LinkedItem.LINKED_DATA_NBT_TAG, this.linkedItem.writeToNBT());
compound.setTag(LinkedItem.LINKED_DATA_NBT_TAG, this.linkedItem.writeToNBT(false));
compound.setInteger(LinkedItem.LINKED_VERSION_VERSION_TAG, this.linkedVersion);
return compound;
}
public void setItemNBT(NBTTagCompound compound) {
this.itemDisplay.readFromNBT(compound);
this.linkedItem.readFromNBT(compound.getCompoundTag(LinkedItem.LINKED_DATA_NBT_TAG), false);
this.linkedItem.readFromNBT(compound.getCompoundTag(LinkedItem.LINKED_DATA_NBT_TAG));
this.linkedVersion = compound.getInteger(LinkedItem.LINKED_VERSION_VERSION_TAG);
}
}