Fixed incompatibility with owner tag

This commit is contained in:
raoulvdberge
2017-09-01 09:53:59 +02:00
parent 591f139f06
commit 811bfeb291

View File

@@ -137,7 +137,7 @@ public abstract class NetworkNode implements INetworkNode, INetworkNodeVisitor,
@Override
public NBTTagCompound write(NBTTagCompound tag) {
if (owner != null) {
tag.setUniqueId(NBT_OWNER, owner);
tag.setString(NBT_OWNER, owner.toString()); // @todo: Use proper NBT UUID methods
}
writeConfiguration(tag);
@@ -154,7 +154,7 @@ public abstract class NetworkNode implements INetworkNode, INetworkNodeVisitor,
public void read(NBTTagCompound tag) {
if (tag.hasKey(NBT_OWNER)) {
owner = tag.getUniqueId(NBT_OWNER);
owner = UUID.fromString(tag.getString(NBT_OWNER)); // @todo: Use proper NBT UUID methods
}
readConfiguration(tag);