Save the owner NBT without gameprofile properties

This commit is contained in:
mezz committed 2016-03-03 22:01:33 -08:00
1 parent 5a901ffa36
commit 86e3ae87fd
10 files changed
+49 -27

No files matched your search

@@ -16,7 +16,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTUtil;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.IChatComponent;
import net.minecraft.world.World;
@@ -36,6 +35,7 @@ import forestry.core.inventory.IInventoryAdapter;
import forestry.core.inventory.InventoryAdapter;
import forestry.core.utils.InventoryUtil;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.PlayerUtil;
import forestry.core.utils.StringUtil;
import forestry.mail.inventory.InventoryTradeStation;
import forestry.mail.items.EnumStampDefinition;
@@ -86,7 +86,7 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve
@Override
public void readFromNBT(NBTTagCompound nbttagcompound) {
if (nbttagcompound.hasKey("owner")) {
owner = NBTUtil.readGameProfileFromNBT(nbttagcompound.getCompoundTag("owner"));
owner = PlayerUtil.readGameProfileFromNBT(nbttagcompound.getCompoundTag("owner"));
}
if (nbttagcompound.hasKey("address")) {
@@ -102,7 +102,7 @@ public class TradeStation extends WorldSavedData implements ITradeStation, IInve
public void writeToNBT(NBTTagCompound nbttagcompound) {
if (owner != null) {
NBTTagCompound nbt = new NBTTagCompound();
NBTUtil.writeGameProfile(nbt, owner);
PlayerUtil.writeGameProfile(nbt, owner);
nbttagcompound.setTag("owner", nbt);
}