public ContainerHorseInventoryTFC(
      InventoryPlayer invPlayer, IInventory invHorse, EntityHorseTFC entityHorse) {
    this.horseInv = invHorse;
    this.horse = entityHorse;
    invHorse.openInventory();
    this.addSlotToContainer(
        new ContainerHorseInventorySlotSaddle(this, invHorse, 0, 8, 18)); // Saddle Slot
    this.addSlotToContainer(
        new ContainerHorseInventorySlotArmor(this, horseInv, 1, 8, 36, horse)); // Armor Slot

    if (entityHorse.isChested()) // Add slots for chested donkey
    {

      for (int j = 0; j < 3; ++j) {
        for (int k = 0; k < 5; ++k) {
          this.addSlotToContainer(
              new SlotChest(invHorse, 2 + k + j * 5, 80 + k * 18, 18 + j * 18)
                  .addItemException(ContainerChestTFC.getExceptions()));
        }
      }
    }

    PlayerInventory.buildInventoryLayout(this, invPlayer, 8, 90, false, true);
  }
 /** Called when the container is closed. */
 @Override
 public void onContainerClosed(EntityPlayer player) {
   super.onContainerClosed(player);
   this.horseInv.closeInventory();
   horse.updateChestSaddle();
 }