diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2012-11-06 06:05:28 -0600 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2012-11-13 16:09:52 -0600 |
commit | 7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7 (patch) | |
tree | 843902ff94d82e86f40d7e0af1ac838fee859e75 /src/main/java/net/minecraft/server/BlockSkull.java | |
parent | a0c3b4f9d1b403fa64230f22b5dd3222181ba646 (diff) | |
download | craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.gz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.lz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.tar.xz craftbukkit-7f7192f8fd8357e664e7e2d6e7c5f65fd0fcd2f7.zip |
Update CraftBukkit to Minecraft 1.4.4.
Diffstat (limited to 'src/main/java/net/minecraft/server/BlockSkull.java')
-rw-r--r-- | src/main/java/net/minecraft/server/BlockSkull.java | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/main/java/net/minecraft/server/BlockSkull.java b/src/main/java/net/minecraft/server/BlockSkull.java index d6cdd23a..968bd941 100644 --- a/src/main/java/net/minecraft/server/BlockSkull.java +++ b/src/main/java/net/minecraft/server/BlockSkull.java @@ -71,7 +71,7 @@ public class BlockSkull extends BlockContainer { public int getDropData(World world, int i, int j, int k) { TileEntity tileentity = world.getTileEntity(i, j, k); - return tileentity != null && tileentity instanceof TileEntitySkull ? ((TileEntitySkull) tileentity).a() : super.getDropData(world, i, j, k); + return tileentity != null && tileentity instanceof TileEntitySkull ? ((TileEntitySkull) tileentity).getSkullType() : super.getDropData(world, i, j, k); } public int getDropData(int i) { @@ -94,7 +94,15 @@ public class BlockSkull extends BlockContainer { if (!world.isStatic) { /* CraftBukkit start - don't special code dropping the item if ((i1 & 8) == 0) { - this.a(world, i, j, k, new ItemStack(Item.SKULL.id, 1, this.getDropData(world, i, j, k))); + ItemStack itemstack = new ItemStack(Item.SKULL.id, 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) { + itemstack.setTag(new NBTTagCompound()); + itemstack.getTag().setString("SkullOwner", tileentityskull.getExtraType()); + } + + this.b(world, i, j, k, itemstack); } // CraftBukkit end */ @@ -107,7 +115,7 @@ public class BlockSkull extends BlockContainer { } public void a(World world, int i, int j, int k, TileEntitySkull tileentityskull) { - if (tileentityskull.a() == 1 && j >= 2) { + if (tileentityskull.getSkullType() == 1 && j >= 2 && world.difficulty > 0) { int l = Block.SOUL_SAND.id; int i1; @@ -195,7 +203,7 @@ public class BlockSkull extends BlockContainer { } else { TileEntity tileentity = world.getTileEntity(i, j, k); - return tileentity != null && tileentity instanceof TileEntitySkull ? ((TileEntitySkull) tileentity).a() == l : false; + return tileentity != null && tileentity instanceof TileEntitySkull ? ((TileEntitySkull) tileentity).getSkullType() == l : false; } } } |