From 20d0fb52659d47da50daa1357b090169e28aeffc Mon Sep 17 00:00:00 2001 From: Robotia Date: Wed, 27 Jan 2016 15:21:05 -0500 Subject: [PATCH] PaperSpigot fix (https://github.com/PaperSpigot/Paper-1.7/commit/978e6c0da2f5e703a4d744b120dbd6b6a22ddd1a) --- .../net/minecraft/block/BlockSkull.java.patch | 32 +++++++++++++++---- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/patches/net/minecraft/block/BlockSkull.java.patch b/patches/net/minecraft/block/BlockSkull.java.patch index a11ef00..b588133 100644 --- a/patches/net/minecraft/block/BlockSkull.java.patch +++ b/patches/net/minecraft/block/BlockSkull.java.patch @@ -12,7 +12,21 @@ public class BlockSkull extends BlockContainer { private static final String __OBFID = "CL_00000307"; -@@ -172,16 +177,18 @@ +@@ -135,9 +140,11 @@ + if ((p_149749_6_ & 8) == 0) + { + ItemStack itemstack = new ItemStack(Items.skull, 1, this.getDamageValue(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_)); +- TileEntitySkull tileentityskull = (TileEntitySkull)p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); ++ TileEntity tileEntity = p_149749_1_.getTileEntity(p_149749_2_, p_149749_3_, p_149749_4_); ++ ++ if (!(tileEntity instanceof TileEntitySkull)) return ret; + +- if (tileentityskull == null) return ret; ++ TileEntitySkull tileentityskull = (TileEntitySkull) tileEntity; + + if (tileentityskull.func_145904_a() == 3 && tileentityskull.func_152108_a() != null) + { +@@ -172,16 +179,18 @@ { if (p_149965_1_.getBlock(p_149965_2_, p_149965_3_ - 1, p_149965_4_ + l) == Blocks.soul_sand && p_149965_1_.getBlock(p_149965_2_, p_149965_3_ - 1, p_149965_4_ + l + 1) == Blocks.soul_sand && p_149965_1_.getBlock(p_149965_2_, p_149965_3_ - 2, p_149965_4_ + l + 1) == Blocks.soul_sand && p_149965_1_.getBlock(p_149965_2_, p_149965_3_ - 1, p_149965_4_ + l + 2) == Blocks.soul_sand && this.func_149966_a(p_149965_1_, p_149965_2_, p_149965_3_, p_149965_4_ + l, 1) && this.func_149966_a(p_149965_1_, p_149965_2_, p_149965_3_, p_149965_4_ + l + 1, 1) && this.func_149966_a(p_149965_1_, p_149965_2_, p_149965_3_, p_149965_4_ + l + 2, 1)) { @@ -38,7 +52,7 @@ if (!p_149965_1_.isRemote) { -@@ -190,18 +197,21 @@ +@@ -190,18 +199,21 @@ entitywither.renderYawOffset = 90.0F; entitywither.func_82206_m(); @@ -68,7 +82,7 @@ } for (i1 = 0; i1 < 120; ++i1) -@@ -209,13 +219,7 @@ +@@ -209,13 +221,7 @@ p_149965_1_.spawnParticle("snowballpoof", (double)p_149965_2_ + p_149965_1_.rand.nextDouble(), (double)(p_149965_3_ - 2) + p_149965_1_.rand.nextDouble() * 3.9D, (double)(p_149965_4_ + l + 1) + p_149965_1_.rand.nextDouble(), 0.0D, 0.0D, 0.0D); } @@ -83,7 +97,7 @@ return; } } -@@ -224,16 +228,18 @@ +@@ -224,16 +230,18 @@ { if (p_149965_1_.getBlock(p_149965_2_ + l, p_149965_3_ - 1, p_149965_4_) == Blocks.soul_sand && p_149965_1_.getBlock(p_149965_2_ + l + 1, p_149965_3_ - 1, p_149965_4_) == Blocks.soul_sand && p_149965_1_.getBlock(p_149965_2_ + l + 1, p_149965_3_ - 2, p_149965_4_) == Blocks.soul_sand && p_149965_1_.getBlock(p_149965_2_ + l + 2, p_149965_3_ - 1, p_149965_4_) == Blocks.soul_sand && this.func_149966_a(p_149965_1_, p_149965_2_ + l, p_149965_3_, p_149965_4_, 1) && this.func_149966_a(p_149965_1_, p_149965_2_ + l + 1, p_149965_3_, p_149965_4_, 1) && this.func_149966_a(p_149965_1_, p_149965_2_ + l + 2, p_149965_3_, p_149965_4_, 1)) { @@ -109,7 +123,7 @@ if (!p_149965_1_.isRemote) { -@@ -241,18 +247,21 @@ +@@ -241,18 +249,21 @@ entitywither.setLocationAndAngles((double)(p_149965_2_ + l) + 1.5D, (double)p_149965_3_ - 1.45D, (double)p_149965_4_ + 0.5D, 0.0F, 0.0F); entitywither.func_82206_m(); @@ -139,7 +153,7 @@ } for (i1 = 0; i1 < 120; ++i1) -@@ -260,13 +269,7 @@ +@@ -260,13 +271,7 @@ p_149965_1_.spawnParticle("snowballpoof", (double)(p_149965_2_ + l + 1) + p_149965_1_.rand.nextDouble(), (double)(p_149965_3_ - 2) + p_149965_1_.rand.nextDouble() * 3.9D, (double)p_149965_4_ + p_149965_1_.rand.nextDouble(), 0.0D, 0.0D, 0.0D); } @@ -154,3 +168,9 @@ return; } } +@@ -300,4 +305,4 @@ + { + return this.getTextureName() + "_" + ItemSkull.field_94587_a[0]; + } +-} ++}