Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Commit

Permalink
PaperSpigot fix (PaperMC/Paper-1.7@978e6c0)
Browse files Browse the repository at this point in the history
  • Loading branch information
sameer committed Jan 27, 2016
1 parent 129f089 commit 20d0fb5
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions patches/net/minecraft/block/BlockSkull.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand All @@ -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();

Expand Down Expand Up @@ -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);
}

Expand All @@ -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))
{
Expand All @@ -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();

Expand Down Expand Up @@ -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);
}

Expand All @@ -154,3 +168,9 @@
return;
}
}
@@ -300,4 +305,4 @@
{
return this.getTextureName() + "_" + ItemSkull.field_94587_a[0];
}
-}
+}

0 comments on commit 20d0fb5

Please sign in to comment.