Files
MinecraftForge/patches/minecraft/net/minecraft/item/ItemBlockSpecial.java.patch
T

39 lines
1.9 KiB
Diff

--- ../src-base/minecraft/net/minecraft/item/ItemBlockSpecial.java
+++ ../src-work/minecraft/net/minecraft/item/ItemBlockSpecial.java
@@ -41,9 +41,9 @@
ItemStack itemstack = p_180614_1_.func_184586_b(p_180614_4_);
- if (!itemstack.func_190926_b() && p_180614_1_.func_175151_a(p_180614_3_, p_180614_5_, itemstack) && p_180614_2_.func_190527_a(this.field_150935_a, p_180614_3_, false, p_180614_5_, (Entity)null))
+ if (!itemstack.func_190926_b() && p_180614_1_.func_175151_a(p_180614_3_, p_180614_5_, itemstack) && p_180614_2_.func_190527_a(this.field_150935_a, p_180614_3_, false, p_180614_5_, p_180614_1_))
{
- IBlockState iblockstate1 = this.field_150935_a.func_180642_a(p_180614_2_, p_180614_3_, p_180614_5_, p_180614_6_, p_180614_7_, p_180614_8_, 0, p_180614_1_);
+ IBlockState iblockstate1 = this.field_150935_a.getStateForPlacement(p_180614_2_, p_180614_3_, p_180614_5_, p_180614_6_, p_180614_7_, p_180614_8_, 0, p_180614_1_, p_180614_4_);
if (!p_180614_2_.func_180501_a(p_180614_3_, iblockstate1, 11))
{
@@ -64,7 +64,7 @@
}
}
- SoundType soundtype = this.field_150935_a.func_185467_w();
+ SoundType soundtype = iblockstate1.func_177230_c().getSoundType(iblockstate1, p_180614_2_, p_180614_3_, p_180614_1_);
p_180614_2_.func_184133_a(p_180614_1_, p_180614_3_, soundtype.func_185841_e(), SoundCategory.BLOCKS, (soundtype.func_185843_a() + 1.0F) / 2.0F, soundtype.func_185847_b() * 0.8F);
itemstack.func_190918_g(1);
return EnumActionResult.SUCCESS;
@@ -75,4 +75,14 @@
return EnumActionResult.FAIL;
}
}
+
+ public Block getBlock()
+ {
+ return this.getBlockRaw() == null ? null : this.getBlockRaw().delegate.get();
+ }
+
+ private Block getBlockRaw()
+ {
+ return this.field_150935_a;
+ }
}