Fixed aoe tool broken blocks losing nbt data

References an already deleted tileEntity causing the item to not have
the required nbt tag.
This commit is contained in:
CreeperShift committed 2016-10-24 04:58:46 +02:00
1 parent dc863b22a0
commit 0b951a8c9a
1 file changed
+3 -1
@@ -22,6 +22,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTool;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.RayTraceResult;
@@ -90,6 +91,7 @@ public final class ToolCommons {
}
if(!player.capabilities.isCreativeMode) {
TileEntity tile = world.getTileEntity(pos);
IBlockState localState = world.getBlockState(pos);
blk.onBlockHarvested(world, pos, localState, player);
@@ -97,7 +99,7 @@ public final class ToolCommons {
blk.onBlockDestroyedByPlayer(world, pos, state);
if(!dispose || !ItemElementiumPick.isDisposable(blk))
blk.harvestBlock(world, player, pos, state, world.getTileEntity(pos), stack);
blk.harvestBlock(world, player, pos, state, tile, stack);
}
damageItem(stack, 1, player, 80);