    001    package net.minecraft.src;
    002
    003    import java.util.Iterator;
    004    import java.util.Map;
    005    import java.util.Map.Entry;
    006
    007    public class MapGenMineshaft extends MapGenStructure
    008    {
    009        private double field_82673_e = 0.01D;
    010
    011        public MapGenMineshaft() {}
    012
    013        public MapGenMineshaft(Map par1Map)
    014        {
    015            Iterator var2 = par1Map.entrySet().iterator();
    016
    017            while (var2.hasNext())
    018            {
    019                Entry var3 = (Entry)var2.next();
    020
    021                if (((String)var3.getKey()).equals("chance"))
    022                {
    023                    this.field_82673_e = MathHelper.func_82712_a((String)var3.getValue(), this.field_82673_e);
    024                }
    025            }
    026        }
    027
    028        protected boolean canSpawnStructureAtCoords(int par1, int par2)
    029        {
    030            return this.rand.nextDouble() < this.field_82673_e && this.rand.nextInt(80) < Math.max(Math.abs(par1), Math.abs(par2));
    031        }
    032
    033        protected StructureStart getStructureStart(int par1, int par2)
    034        {
    035            return new StructureMineshaftStart(this.worldObj, this.rand, par1, par2);
    036        }
    037    }