gt:         super.breakBlock(world, x, y, z, p_149749_5_, p_149749_6_);
context: package com.beltzac.metalmilkshake.block;
  
  import java.util.Random;
  
  import net.minecraft.block.Block;
  import net.minecraft.block.BlockContainer;
  import net.minecraft.block.material.Material;
  import net.minecraft.client.renderer.texture.IIconRegister;
  import net.minecraft.entity.EntityLivingBase;
  import net.minecraft.entity.item.EntityItem;
  import net.minecraft.entity.player.EntityPlayer;
  import net.minecraft.item.Item;
  import net.minecraft.item.ItemStack;
  import net.minecraft.nbt.NBTTagCompound;
  import net.minecraft.tileentity.TileEntity;
  import net.minecraft.util.IIcon;
  import net.minecraft.util.MathHelper;
  import net.minecraft.util.MovingObjectPosition;
  import net.minecraft.world.World;
  
  import com.beltzac.metalmilkshake.MetalMilkshake;
  import com.beltzac.metalmilkshake.tileentity.TileEntitySmelter;
  
  import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
  import cpw.mods.fml.relauncher.Side;
  import cpw.mods.fml.relauncher.SideOnly;
  
  public class Smelter extends BlockContainer
  {
  
      Random random = new Random();
  
      private final boolean isActive;
  
      @SideOnly(Side.CLIENT)
      private IIcon iconFront;
  
      private static boolean keepInventory;
  
      public Smelter(boolean isActive)
      {
          super(Material.rock);
          this.isActive = isActive;
      }
  
      @Override
      public TileEntity createNewTileEntity (World var1, int var2)
      {
          return new TileEntitySmelter();
      }
  
      @SideOnly(Side.CLIENT)
      @Override
      public void registerBlockIcons (IIconRegister iconRegister)
      {
          this.blockIcon = iconRegister.registerIcon(MetalMilkshake.modid + ":" + "SMELTER_SIDES");
          this.iconFront = iconRegister.registerIcon(MetalMilkshake.modid + ":" + (isActive ? "SMELTER_FRONT_ACTIVE" : "SMELTER_FRONT_IDLE"));
      }
  
      @SideOnly(Side.CLIENT)
      @Override
      public IIcon getIcon (int side, int metadata)
      {
          return metadata == 0 && side == 3 ? this.iconFront : (side == metadata ? this.iconFront : blockIcon);
      }
  
      @Override
      public void onBlockAdded (World world, int x, int y, int z)
      {
          super.onBlockAdded(world, x, y, z);
          this.setDefaultDirection(world, x, y, z);
      }
  
      private void setDefaultDirection (World world, int x, int y, int z)
      {
          if (!world.isRemote)
          {
              byte b0 = 3;
              world.setBlockMetadataWithNotify(x, y, z, b0, 2);
          }
      }
  
      @Override
      public void onBlockPlacedBy (World world, int x, int y, int z, EntityLivingBase entityLivingBase, ItemStack itemStack)
      {
          super.onBlockPlacedBy(world, x, y, z, entityLivingBase, itemStack);
  
          int l = MathHelper.floor_double((double) (entityLivingBase.rotationYaw * 4.0f / 360f) + 0.5d) & 3;
  
          if (l == 0)
              world.setBlockMetadataWithNotify(x, y, z, 2, 2);
  
          if (l == 1)
              world.setBlockMetadataWithNotify(x, y, z, 5, 2);
  
          if (l == 2)
              world.setBlockMetadataWithNotify(x, y, z, 3, 2);
  
          if (l == 3)
              world.setBlockMetadataWithNotify(x, y, z, 4, 2);
  
          if (itemStack.hasDisplayName())
          {
              ((TileEntitySmelter) world.getTileEntity(x, y, z)).setGuiDisplayName(itemStack.getDisplayName());
          }
  
      }
  
      @Override
      public boolean onBlockActivated (World world, int x, int y, int z, EntityPlayer player, int side, float p_149727_7_, float p_149727_8_, float p_149727_9_)
      {
          if (!world.isRemote)
          {
              FMLNetworkHandler.openGui(player, MetalMilkshake.instance, MetalMilkshake.guiIdSmelter, world, x, y, z);
          }
          return true;
      }
  
      public static void updateBlockState (boolean active, World worldObj, int xCoord, int yCoord, int zCoord)
      {
          int i = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
          TileEntity tileentity = worldObj.getTileEntity(xCoord, yCoord, zCoord);
          keepInventory = true;
          if (active)
          {
              worldObj.setBlock(xCoord, yCoord, zCoord, MetalMilkshake.smelterActive);
          }
          else
          {
              worldObj.setBlock(xCoord, yCoord, zCoord, MetalMilkshake.smelterIdle);
          }
          keepInventory = false;
  
          worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, i, 2);
  
          if (tileentity != null)
          {
              tileentity.validate();
              worldObj.setTileEntity(xCoord, yCoord, zCoord, tileentity);
          }
  
      }
  
      @Override
      public ItemStack getPickBlock (MovingObjectPosition target, World world, int x, int y, int z)
      {
          return new ItemStack(MetalMilkshake.smelterIdle);
      }
  
      @Override
      public Item getItemDropped (int p_149650_1_, Random p_149650_2_, int p_149650_3_)
      {
          return Item.getItemFromBlock(MetalMilkshake.smelterIdle);
      }
  
      @Override
      public void breakBlock (World world, int x, int y, int z, Block p_149749_5_, int p_149749_6_)
      {
          super.breakBlock(world, x, y, z, p_149749_5_, p_149749_6_);
          if (!keepInventory)
          {
              TileEntitySmelter smelter = (TileEntitySmelter) world.getTileEntity(x, y, z);
  
              if (smelter != null)
              {
                  for (int i = 0; i < smelter.getSizeInventory(); i++)
                  {
                      ItemStack itemStack = smelter.getStackInSlot(i);
                      if (itemStack != null)
                      {
                          float f1 = random.nextFloat() * 0.8f + 0.1f;
                          float f2 = random.nextFloat() * 0.8f + 0.1f;
                          float f3 = random.nextFloat() * 0.8f + 0.1f;
  
                          while (itemStack.stackSize > 0)
                          {
                              int j = random.nextInt(21) + 10;
  
                              if (j > itemStack.stackSize)
                              {
                                  j = itemStack.stackSize;
                              }
  
                              itemStack.stackSize -= j;
  
                              EntityItem item = new EntityItem(world, (float) x + f1, (float) y + f2, (float) z + f3, new ItemStack(itemStack.getItem(), j, itemStack.getItemDamage()));
  
                              if (itemStack.hasTagCompound())
                              {
                                  item.getEntityItem().setTagCompound((NBTTagCompound) itemStack.getTagCompound().copy());
                              }
  
                              float f4 = 0.05f;
                              item.motionX = random.nextGaussian() * f4;
                              item.motionY = random.nextGaussian() * f4 + 0.2f;
                              item.motionZ = random.nextGaussian() * f4;
  
                              world.spawnEntityInWorld(item);
  
                          }
  
                      }
                  }
  
                  //TODO func_96440_m
  
              }
  
          }
  