From 0f06365e1f14fd4671b3003609585a2baa57034a Mon Sep 17 00:00:00 2001 From: mezz Date: Mon, 28 Mar 2016 16:21:35 -0700 Subject: [PATCH] Fix Block.getPickBlock returning an ItemStack with a null Item --- .../minecraft/net/minecraft/block/Block.java.patch | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/patches/minecraft/net/minecraft/block/Block.java.patch b/patches/minecraft/net/minecraft/block/Block.java.patch index d99e75e9da..133ed0cd81 100644 --- a/patches/minecraft/net/minecraft/block/Block.java.patch +++ b/patches/minecraft/net/minecraft/block/Block.java.patch @@ -188,15 +188,20 @@ } protected ItemStack func_180643_i(IBlockState p_180643_1_) -@@ -747,6 +767,7 @@ +@@ -747,9 +767,11 @@ p_176216_2_.field_70181_x = 0.0D; } + @Deprecated // Forge: Use more sensitive version below: getPickBlock public ItemStack func_185473_a(World p_185473_1_, BlockPos p_185473_2_, IBlockState p_185473_3_) { - return new ItemStack(Item.func_150898_a(this), 1, this.func_180651_a(p_185473_3_)); -@@ -844,6 +865,1168 @@ +- return new ItemStack(Item.func_150898_a(this), 1, this.func_180651_a(p_185473_3_)); ++ Item item = Item.func_150898_a(this); ++ return item == null ? null : new ItemStack(item, 1, this.func_180651_a(p_185473_3_)); + } + + @SideOnly(Side.CLIENT) +@@ -844,6 +866,1168 @@ return "Block{" + field_149771_c.func_177774_c(this) + "}"; }