    001    package net.minecraft.src;
    002
    003    import net.minecraft.server.MinecraftServer;
    004
    005    public class BehaviorBucketFullDispense extends BehaviorDefaultDispenseItem
    006    {
    007        private final BehaviorDefaultDispenseItem field_82495_c;
    008
    009        final MinecraftServer field_82494_b;
    010
    011        public BehaviorBucketFullDispense(MinecraftServer par1)
    012        {
    013            this.field_82494_b = par1;
    014            this.field_82495_c = new BehaviorDefaultDispenseItem();
    015        }
    016
    017        public ItemStack func_82487_b(IBlockSource par1IBlockSource, ItemStack par2ItemStack)
    018        {
    019            ItemBucket var3 = (ItemBucket)par2ItemStack.getItem();
    020            int var4 = par1IBlockSource.func_82623_d();
    021            int var5 = par1IBlockSource.func_82622_e();
    022            int var6 = par1IBlockSource.func_82621_f();
    023            EnumFacing var7 = EnumFacing.func_82600_a(par1IBlockSource.func_82620_h());
    024
    025            if (var3.tryPlaceContainedLiquid(par1IBlockSource.func_82618_k(), (double)var4, (double)var5, (double)var6, var4 + var7.func_82601_c(), var5, var6 + var7.func_82599_e()))
    026            {
    027                par2ItemStack.itemID = Item.bucketEmpty.shiftedIndex;
    028                par2ItemStack.stackSize = 1;
    029                return par2ItemStack;
    030            }
    031            else
    032            {
    033                return this.field_82495_c.func_82482_a(par1IBlockSource, par2ItemStack);
    034            }
    035        }
    036    }