/** Called when the blocks is activated. We are using it to open our GUI */
 @Override
 public boolean onBlockActivated(
     World world,
     int x,
     int y,
     int z,
     EntityPlayer player,
     int par6,
     float par7,
     float par8,
     float par9) {
   if (!player.isSneaking()) {
     DummyTile us = (DummyTile) world.getTileEntity(x, y, z);
     if (us.getCore() != null)
       player.openGui(
           Bookshelf.instance,
           0,
           world,
           us.getCore().xCoord,
           us.getCore().yCoord,
           us.getCore().zCoord);
     return true;
   }
   return true;
 }
  @Override
  public void breakBlock(World world, int x, int y, int z, Block par5, int par6) {
    DummyTile dummy = (DummyTile) world.getTileEntity(x, y, z);
    AbstractCore core = dummy.getCore();

    if (core != null && !world.isRemote) {
      core.setDirty();
    }

    Block block = dummy.getStoredBlock();
    int meta = dummy.getMetadata();

    if (world.isAirBlock(x, y, z)) {
      float f = world.rand.nextFloat() * 0.8F + 0.1F;
      float f1 = world.rand.nextFloat() * 0.8F + 0.1F;
      float f2 = world.rand.nextFloat() * 0.8F + 0.1F;

      EntityItem entityitem =
          new EntityItem(
              world,
              (double) x + f,
              (double) y + f1,
              (double) z + f2,
              new ItemStack(block, 1, meta));
      world.spawnEntityInWorld(entityitem);
      world.func_147453_f(x, y, z, par5);
    }
    super.breakBlock(world, x, y, z, par5, par6);
  }