public void spawnXP() {
    if (!this.getWorldObj().isRemote) {
      float f = 0F;
      for (int i = 0; i < 3; i++) {
        ItemStack stack = this.brewingItemStacks[i];
        if (stack != null) {
          f += PotionType.getExperience(stack);
        }
      }

      int i = Math.round(f);
      int j;
      while (i > 0) {
        j = EntityXPOrb.getXPSplit(i);
        i -= j;
        this.getWorldObj()
            .spawnEntityInWorld(
                new EntityXPOrb(
                    this.getWorldObj(),
                    this.xCoord + 0.5D,
                    this.yCoord + 0.5D,
                    this.zCoord + 0.5D,
                    j));
      }
    }
  }
 @Override
 public boolean isItemValidForSlot(int slotID, ItemStack stack) {
   if (slotID == 3) {
     return PotionType.isPotionIngredient(stack);
   } else {
     return stack.getItem() instanceof ItemPotion2;
   }
 }