@Override
  public void onContainerClosed(EntityPlayer entityplayer) {
    super.onContainerClosed(entityplayer);

    tileEntity.close(entityplayer);
    tileEntity.closeInventory();
  }
  public ContainerChemicalDissolutionChamber(
      InventoryPlayer inventory, TileEntityChemicalDissolutionChamber tentity) {
    tileEntity = tentity;
    addSlotToContainer(new SlotStorageTank(tentity, 0, 6, 65));
    addSlotToContainer(new Slot(tentity, 1, 26, 36));
    addSlotToContainer(new SlotStorageTank(tentity, 2, 155, 25));
    addSlotToContainer(new SlotDischarge(tentity, 3, 155, 5));
    addSlotToContainer(new SlotMachineUpgrade(tentity, 4, 180, 11));

    int slotY;

    for (slotY = 0; slotY < 3; slotY++) {
      for (int slotX = 0; slotX < 9; slotX++) {
        addSlotToContainer(
            new Slot(inventory, slotX + slotY * 9 + 9, 8 + slotX * 18, 84 + slotY * 18));
      }
    }

    for (slotY = 0; slotY < 9; slotY++) {
      addSlotToContainer(new Slot(inventory, slotY, 8 + slotY * 18, 142));
    }

    tileEntity.open(inventory.player);
    tileEntity.openInventory();
  }
 @Override
 public boolean canInteractWith(EntityPlayer entityplayer) {
   return tileEntity.isUseableByPlayer(entityplayer);
 }