From c25ddf063a808e3adb749e22017661f403c5fb7e Mon Sep 17 00:00:00 2001 From: md_5 Date: Thu, 17 Nov 2016 12:41:03 +1100 Subject: Update to Minecraft 1.11 --- nms-patches/BlockSkull.patch | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'nms-patches/BlockSkull.patch') diff --git a/nms-patches/BlockSkull.patch b/nms-patches/BlockSkull.patch index ba234cb7..51d202cf 100644 --- a/nms-patches/BlockSkull.patch +++ b/nms-patches/BlockSkull.patch @@ -12,7 +12,7 @@ public class BlockSkull extends BlockTileEntity { public static final BlockStateDirection FACING = BlockDirectional.FACING; -@@ -82,7 +87,25 @@ +@@ -82,7 +87,29 @@ return new ItemStack(Items.SKULL, 1, i); } @@ -21,25 +21,29 @@ + @Override + public void dropNaturally(World world, BlockPosition blockposition, IBlockData iblockdata, float f, int i) { + if (world.random.nextFloat() < f) { -+ TileEntitySkull tileentityskull = (TileEntitySkull) world.getTileEntity(blockposition); -+ ItemStack itemstack = this.a(world, blockposition, iblockdata); ++ TileEntity tileentity = world.getTileEntity(blockposition); + -+ if (tileentityskull.getSkullType() == 3 && tileentityskull.getGameProfile() != null) { -+ itemstack.setTag(new NBTTagCompound()); -+ NBTTagCompound nbttagcompound = new NBTTagCompound(); ++ if (tileentity instanceof TileEntitySkull) { ++ TileEntitySkull tileentityskull = (TileEntitySkull) tileentity; ++ ItemStack itemstack = this.a(world, blockposition, iblockdata); + -+ GameProfileSerializer.serialize(nbttagcompound, tileentityskull.getGameProfile()); -+ itemstack.getTag().set("SkullOwner", nbttagcompound); -+ } ++ if (tileentityskull.getSkullType() == 3 && tileentityskull.getGameProfile() != null) { ++ itemstack.setTag(new NBTTagCompound()); ++ NBTTagCompound nbttagcompound = new NBTTagCompound(); ++ ++ GameProfileSerializer.serialize(nbttagcompound, tileentityskull.getGameProfile()); ++ itemstack.getTag().set("SkullOwner", nbttagcompound); ++ } + -+ a(world, blockposition, itemstack); ++ a(world, blockposition, itemstack); ++ } + } + } + // CraftBukkit end public void a(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman) { if (entityhuman.abilities.canInstantlyBuild) { -@@ -95,7 +118,10 @@ +@@ -95,7 +122,10 @@ public void remove(World world, BlockPosition blockposition, IBlockData iblockdata) { if (!world.isClientSide) { @@ -51,7 +55,7 @@ TileEntity tileentity = world.getTileEntity(blockposition); if (tileentity instanceof TileEntitySkull) { -@@ -128,24 +154,36 @@ +@@ -127,24 +157,36 @@ } public void a(World world, BlockPosition blockposition, TileEntitySkull tileentityskull) { @@ -90,7 +94,7 @@ } } -@@ -158,14 +196,16 @@ +@@ -157,14 +199,16 @@ entitywither.o(); Iterator iterator = world.a(EntityHuman.class, entitywither.getBoundingBox().g(50.0D)).iterator(); @@ -109,8 +113,8 @@ int k; for (k = 0; k < 120; ++k) { -@@ -179,6 +219,7 @@ - world.update(shapedetectorblock2.getPosition(), Blocks.AIR); +@@ -178,6 +222,7 @@ + world.update(shapedetectorblock2.getPosition(), Blocks.AIR, false); } } + } // CraftBukkit end -- cgit v1.2.3