    001    package net.minecraft.src;
    002
    003    import net.minecraft.server.MinecraftServer;
    004
    005    public class BehaviorPotionDispense implements IBehaviorDispenseItem
    006    {
    007        /** Reference to the BehaviorDefaultDispenseItem object. */
    008        private final BehaviorDefaultDispenseItem defaultItemDispenseBehavior;
    009
    010        /** Reference to the MinecraftServer object. */
    011        final MinecraftServer mcServer;
    012
    013        public BehaviorPotionDispense(MinecraftServer par1)
    014        {
    015            this.mcServer = par1;
    016            this.defaultItemDispenseBehavior = new BehaviorDefaultDispenseItem();
    017        }
    018
    019        /**
    020         * Dispenses the specified ItemStack from a dispenser.
    021         */
    022        public ItemStack dispense(IBlockSource par1IBlockSource, ItemStack par2ItemStack)
    023        {
    024            return ItemPotion.isSplash(par2ItemStack.getItemDamage()) ? (new BehaviorPotionDispenseLogic(this, par2ItemStack)).dispense(par1IBlockSource, par2ItemStack) : this.defaultItemDispenseBehavior.dispense(par1IBlockSource, par2ItemStack);
    025        }
    026    }