@Override
  public void updateProgressBar(int id, int val) {
    if (id == 0) {
      fluid.isSending = val == 1;
    } else if (id == 1) {
      if (val == -1) {
        fluid.tank.setFluid(null);
      } else {
        fluid.tank.setFluid(new FluidStack(val, 0));
      }
    } else if (id == 2) {
      FluidStack f = fluid.tank.getFluid();

      if (f != null) {
        f.amount = val;
        fluid.tank.setFluid(f);
      }
    }
  }
 @Override
 public void handleGuiPacket(NBTTagCompound tag, EntityPlayer player) {
   fluid.isSending = !fluid.isSending;
 }