From 8f771c737850130534b0fade70494f7ce3cbc8fd Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Thu, 10 Apr 2014 20:04:38 -0500 Subject: Update CraftBukkit to Minecraft 1.7.8 --- src/main/java/net/minecraft/server/BlockSkull.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/main/java/net/minecraft/server/BlockSkull.java') diff --git a/src/main/java/net/minecraft/server/BlockSkull.java b/src/main/java/net/minecraft/server/BlockSkull.java index e24b7408..b05f4639 100644 --- a/src/main/java/net/minecraft/server/BlockSkull.java +++ b/src/main/java/net/minecraft/server/BlockSkull.java @@ -84,9 +84,12 @@ public class BlockSkull extends BlockContainer { ItemStack itemstack = new ItemStack(Items.SKULL, 1, this.getDropData(world, i, j, k)); TileEntitySkull tileentityskull = (TileEntitySkull) world.getTileEntity(i, j, k); - if (tileentityskull.getSkullType() == 3 && tileentityskull.getExtraType() != null && tileentityskull.getExtraType().length() > 0) { + if (tileentityskull.getSkullType() == 3 && tileentityskull.getGameProfile() != null) { itemstack.setTag(new NBTTagCompound()); - itemstack.getTag().setString("SkullOwner", tileentityskull.getExtraType()); + NBTTagCompound nbttagcompound = new NBTTagCompound(); + + GameProfileSerializer.a(nbttagcompound, tileentityskull.getGameProfile()); + itemstack.getTag().set("SkullOwner", nbttagcompound); } this.a(world, i, j, k, itemstack); @@ -112,9 +115,12 @@ public class BlockSkull extends BlockContainer { ItemStack itemstack = new ItemStack(Items.SKULL, 1, this.getDropData(world, i, j, k)); TileEntitySkull tileentityskull = (TileEntitySkull) world.getTileEntity(i, j, k); - if (tileentityskull.getSkullType() == 3 && tileentityskull.getExtraType() != null && tileentityskull.getExtraType().length() > 0) { + if (tileentityskull.getSkullType() == 3 && tileentityskull.getGameProfile() != null) { itemstack.setTag(new NBTTagCompound()); - itemstack.getTag().setString("SkullOwner", tileentityskull.getExtraType()); + NBTTagCompound nbttagcompound = new NBTTagCompound(); + + GameProfileSerializer.a(nbttagcompound, tileentityskull.getGameProfile()); + itemstack.getTag().set("SkullOwner", nbttagcompound); } this.a(world, i, j, k, itemstack); -- cgit v1.2.3