From 0243df1c4a9fe9f8a8642e0b8d11e7384056dee2 Mon Sep 17 00:00:00 2001 From: LexManos Date: Fri, 30 Nov 2012 20:22:50 -0800 Subject: [PATCH] Fix issue where non-BlockContainer TEs would not be removed properly. --- .../common/net/minecraft/src/Block.java.patch | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/patches/common/net/minecraft/src/Block.java.patch b/patches/common/net/minecraft/src/Block.java.patch index cc07696b5..d614bdbfa 100644 --- a/patches/common/net/minecraft/src/Block.java.patch +++ b/patches/common/net/minecraft/src/Block.java.patch @@ -60,7 +60,22 @@ } @SideOnly(Side.CLIENT) -@@ -633,8 +645,7 @@ +@@ -609,7 +621,13 @@ + /** + * ejects contained items into the world, and notifies neighbours of an update, as appropriate + */ +- public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) {} ++ public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6) ++ { ++ if (hasTileEntity(par6) && !(this instanceof BlockContainer)) ++ { ++ par1World.removeBlockTileEntity(par2, par3, par4); ++ } ++ } + + /** + * Returns the quantity of items to drop on block destruction. +@@ -633,8 +651,7 @@ */ public float getPlayerRelativeBlockHardness(EntityPlayer par1EntityPlayer, World par2World, int par3, int par4, int par5) { @@ -70,7 +85,7 @@ } /** -@@ -652,18 +663,13 @@ +@@ -652,18 +669,13 @@ { if (!par1World.isRemote) { @@ -93,7 +108,7 @@ } } } -@@ -1048,7 +1054,7 @@ +@@ -1048,7 +1060,7 @@ par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1); par2EntityPlayer.addExhaustion(0.025F); @@ -102,7 +117,7 @@ { ItemStack var8 = this.createStackedBlock(par6); -@@ -1325,4 +1331,849 @@ +@@ -1325,4 +1337,849 @@ canBlockGrass[0] = true; StatList.initBreakableStats(); }