    001    package net.minecraft.src;
    002
    003    import java.util.Random;
    004    import net.minecraft.server.MinecraftServer;
    005
    006    public class BehaviorDispenseFireball extends BehaviorDefaultDispenseItem
    007    {
    008        final MinecraftServer field_82504_b;
    009
    010        public BehaviorDispenseFireball(MinecraftServer par1MinecraftServer)
    011        {
    012            this.field_82504_b = par1MinecraftServer;
    013        }
    014
    015        public ItemStack func_82487_b(IBlockSource par1IBlockSource, ItemStack par2ItemStack)
    016        {
    017            EnumFacing var3 = EnumFacing.func_82600_a(par1IBlockSource.func_82620_h());
    018            IPosition var4 = BlockDispenser.func_82525_a(par1IBlockSource);
    019            double var5 = var4.func_82615_a() + (double)((float)var3.func_82601_c() * 0.3F);
    020            double var7 = var4.func_82617_b();
    021            double var9 = var4.func_82616_c() + (double)((float)var3.func_82599_e() * 0.3F);
    022            World var11 = par1IBlockSource.func_82618_k();
    023            Random var12 = var11.rand;
    024            double var13 = var12.nextGaussian() * 0.05D + (double)var3.func_82601_c();
    025            double var15 = var12.nextGaussian() * 0.05D;
    026            double var17 = var12.nextGaussian() * 0.05D + (double)var3.func_82599_e();
    027            var11.spawnEntityInWorld(new EntitySmallFireball(var11, var5, var7, var9, var13, var15, var17));
    028            par2ItemStack.splitStack(1);
    029            return par2ItemStack;
    030        }
    031
    032        protected void func_82485_a(IBlockSource par1IBlockSource)
    033        {
    034            par1IBlockSource.func_82618_k().playAuxSFX(1009, par1IBlockSource.func_82623_d(), par1IBlockSource.func_82622_e(), par1IBlockSource.func_82621_f(), 0);
    035        }
    036    }