    001    package cpw.mods.fml.common.modloader;
    002
    003    import java.util.Random;
    004
    005    import net.minecraft.src.ItemStack;
    006    import net.minecraft.src.World;
    007    import cpw.mods.fml.common.IDispenseHandler;
    008    import cpw.mods.fml.common.IDispenserHandler;
    009
    010    public class ModLoaderDispenseHelper implements IDispenserHandler
    011    {
    012
    013        private BaseModProxy mod;
    014
    015        public ModLoaderDispenseHelper(BaseModProxy mod)
    016        {
    017            this.mod = mod;
    018        }
    019
    020        @Override
    021        public int dispense(int x, int y, int z, int xVelocity, int zVelocity, World world, ItemStack item, Random random, double entX, double entY,
    022                double entZ)
    023        {
    024            int ret = mod.dispenseEntity(world, item, random, x, y, z, xVelocity, zVelocity, entX, entY, entZ);
    025            return ret == 0 ? -1 : ret;
    026        }
    027
    028    }