diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockSkull.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockSkull.java | 14 |
1 files changed, 10 insertions, 4 deletions
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); |