Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -1326,8 +1326,11 @@ public NBTTagCompound writeToNBT(NBTTagCompound data) {

data.setBoolean(TAG_KEY_MUFFLED, muffled);

if (owner != null)
data.setUniqueId("Owner", owner);
if (owner != null) {
NBTTagCompound ownerTag = new NBTTagCompound();
ownerTag.setUniqueId("UUID", owner);
data.setTag("Owner", ownerTag);
}

return data;
}
Expand Down Expand Up @@ -1355,8 +1358,9 @@ public void readFromNBT(NBTTagCompound data) {
CoverSaveHandler.readCoverNBT(data, this, covers::put);
this.muffled = data.getBoolean(TAG_KEY_MUFFLED);

if (data.hasKey("Owner"))
this.owner = data.getUniqueId("Owner");
if (data.hasKey("Owner", 10)) {
this.owner = data.getCompoundTag("Owner").getUniqueId("UUID");
}
}

@Override
Expand Down
Loading