Advertisement
marcopolo1613

BOD V2.6 MC 1.5.2

May 25th, 2013
451
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 40.21 KB | None | 0 0
  1. //world gen minable
  2. package net.minecraft.src;
  3. import java.io.*;
  4. import java.util.*;
  5. import net.minecraft.client.Minecraft; // remove for multiplayer server
  6. import java.util.Random;
  7. import java.util.Arrays;
  8.  
  9. // Referenced classes of package net.minecraft.src:
  10. //                      WorldGenerator, MathHelper, World, Block
  11.  
  12. public class WorldGenMinable extends WorldGenerator
  13. {
  14.  
  15.     public WorldGenMinable(int par1, int par2)
  16.     {
  17.         this(par1, par2, Block.stone.blockID);
  18.     }
  19.  
  20.     public WorldGenMinable(int par1, int par2, int par3)
  21.     {
  22.         this.minableBlockId = par1;
  23.         this.numberOfBlocks = par2;
  24.         this.field_94523_c = par3;
  25.     }
  26.  
  27.     public WorldGenMinable(int id, int meta, int number, int target)
  28.     {
  29.         this(id, number, target);
  30.         minableBlockMeta = meta;
  31.     }
  32.    
  33.     public boolean generateBeforeCheck() // takes a set of current global variables and checks to see if this ore has spawned before in this chunk
  34.     {
  35.             genBeforeCheck = false;
  36.             genBeforeCheck = oreList.contains(Arrays.asList(MPBlockID, minableBlockMeta));
  37.  
  38.             if(oreList.contains(Arrays.asList(MPBlockID, minableBlockMeta)) == false)
  39.             {
  40.                     oreList.add(Arrays.asList(MPBlockID, minableBlockMeta));
  41.                    
  42.             }
  43.             return genBeforeCheck;
  44.     }
  45.     public void genOverrides(World world, Random random, int xCoord, int zCoord, int resetTo)
  46.     {
  47.        
  48.         BODFile = new File(configDirectory + "/" + versionNum + "BOD-Overrides.txt");
  49.         File f = new File(configDirectory + "");
  50.         Properties props = new Properties();
  51.         if(f.exists()==false)// make the folder if it doesnt exist
  52.         {
  53.             f.mkdirs();
  54.         }
  55.         if(BODFile.exists()==false) // make the file if it doesnt exist
  56.         {
  57.             if(whatWorld=="/OverWorld")
  58.             {
  59.                 writeBODoverrides(BODFile);
  60.             }
  61.             if(whatWorld=="/Nether")
  62.             {
  63.                 writeBODnetherOverrides(BODFile);
  64.             }
  65.             //System.out.println("write BODprops"); /// for debugging
  66.         }
  67.         if(BODFile.exists())
  68.         {
  69.             boolean overrideExists = true;
  70.             int count = 1;
  71.             try
  72.             {
  73.                 props.load(new FileInputStream(BODFile));
  74.                 String valPass = "0";
  75.                 while(overrideExists) // loop until we dont have anymore overrids listed
  76.                 {
  77.                     valPass = String.valueOf(count + ".add_new_ore"); // find the override string
  78.                     if (props.getProperty(valPass)!= null) // make sure it exists
  79.                     {
  80.                         valPass = props.getProperty(valPass); // get the text data off the end
  81.                         String[] strobj = valPass.split(":");
  82.                         minableBlockId = Integer.valueOf(strobj[0]);
  83.                         minableBlockMeta = Integer.valueOf(strobj[1]);
  84.                         //System.out.println(minableBlockId +" " + minableBlockMeta + "outputs"); for debugging
  85.                         generate(world, random, xCoord, zCoord, 1);
  86.                     }
  87.                     else
  88.                     {
  89.                         overrideExists = false;
  90.                     }
  91.                     count++;
  92.                 }
  93.                 minableBlockId = resetTo; // set it back to dirt before leaving
  94.                 minableBlockMeta = 0;
  95.             }
  96.             catch(IOException e)
  97.             {
  98.                
  99.             }
  100.         }
  101.     }
  102.     void createMine( World worldObj, Random rand, int x, int z)
  103.     {
  104.         for(int loopCount = 0; loopCount < veinAm; loopCount++)
  105.         {
  106.             int temp1 = mPCalculateDensity(diameter, hDens);
  107.             int temp2 = mineHeight + mPCalculateDensity(height, vDens);
  108.             int temp3 = mPCalculateDensity(diameter, hDens);
  109.             int l5 = x + temp1;
  110.             int i9 = temp2;
  111.             int k13 = z + temp3;
  112.             if(useMarcoVeins == false)
  113.             {
  114.                 BODgenerate(worldObj, rand, l5, i9, k13, veinSi); // generate based on values
  115.             }
  116.             else
  117.             {
  118.                 BODgenerateVein(worldObj, rand, l5, i9, k13, veinSi);
  119.             }
  120.         }
  121.     }
  122.     void createMineWithChance(World worldObj, Random rand, int x, int z)
  123.     {
  124.         rarity = mPBiomeRarity(rarity, x, z, MPBlockID); // retrieve rarity for this ore in this biome
  125.         if (rarity == 1 || (rarity > 0 && rand.nextInt(rarity) == 0)) // use values
  126.         {
  127.             createMine(worldObj, rand, x, z);
  128.         }
  129.     }
  130.     public boolean generate(World world, Random random, int i, int j, int k)//obsorb default system
  131.     {
  132.         if(minableBlockId == 3) {whatWorld = "/OverWorld";}
  133.         if(minableBlockId == 153) {whatWorld = "/Nether";}
  134.         configDirectory = new File(Minecraft.getMinecraftDir() + "/BODprops/" + whatWorld);// used for switching the code to singleplayer
  135.         //configDirectory = new File(new File(".").getAbsolutePath() + "/BODprops/" + whatWorld); // used for switching the code to multiplayer  
  136.  
  137.          //System.out.println(" 1: call "+minableBlockId+":"+minableBlockMeta); // for debugging
  138.         randomOut = random;     // pad the seed so it's the same as vannila
  139.         randomOut.nextFloat(); //   |
  140.         randomOut.nextInt(3);  //   |                          
  141.         randomOut.nextInt(3);  //   |
  142.         randomOut.nextDouble();//   |
  143.         if (minableBlockId==3 || minableBlockId==153)// this makes sure everything is on a once per ore gen basis, because dirt generates first it sets everything up
  144.         {      
  145.             //System.out.println(" 1.2: found dirt, setting up"); /// for debugging
  146.             MPChunk_X =((i / 16) * 16);// set output chunk x // snap to grid
  147.             MPChunk_Z =((k / 16) * 16);// set output chunk z    
  148.                                
  149. /*----*/    Random randomz = new Random(world.getSeed()); // setup a random for BOD
  150.                         long l = (randomz.nextLong() / 2L) * 2L + 1L;                       // |
  151.                         long l1 = (randomz.nextLong() / 2L) * 2L + 1L;                      // |
  152.                         randomz.setSeed((long)i * l + (long)j * l1 ^ world.getSeed());      // |
  153. /*----*/    rand = randomz;
  154.  
  155.             worldObj = world; // set world
  156.             mineCount = 0; // this is a new chunk, so list gets set to the beginning
  157.        
  158.             oreList.clear(); // clear the list of ores, this is a new chunk
  159.                                        
  160.         }  
  161.        
  162.         MPBlockID = minableBlockId;// set output block ID
  163.         if(MPChunk_X != MPPrevX || MPChunk_Z != MPPrevZ || MPPrevID != MPBlockID || minableBlockMeta != MPPrevMeta)// if it is a new x or z chunk, then generate // blockID stops dirt
  164.         {
  165.                 //System.out.println(" 2: allowed ore chunk prev test"); /// for debugging
  166.                 if(minableBlockId==3 || minableBlockId==153)
  167.                 {
  168.                     genOverrides(worldObj, rand, MPChunk_X, MPChunk_Z, minableBlockId);
  169.                 }
  170.                 if (generateBeforeCheck() == false)
  171.                 {
  172.                         //System.out.println(" 2.2: procede with gen"); /// for debugging315 56 298
  173.                         MPPrevX = MPChunk_X;
  174.                         MPPrevZ = MPChunk_Z;
  175.                         x_Chunk = MPChunk_X;
  176.                         z_Chunk = MPChunk_Z;
  177.                         MPPrevID = MPBlockID;
  178.                         MPPrevMeta = minableBlockMeta;
  179.                         mineGen = 1;
  180.                         subMineGen = 1;
  181.                    
  182.                         BODFile = new File(configDirectory + "/" + versionNum + "BOD-Mine[1.1].txt");
  183.                         BODFileOres = BODFile;
  184.                         BODbiomesFile = new File(configDirectory + "/" + versionNum + "BOD-biomes-Mine[1.1].txt");
  185.                         File f=new File(configDirectory + "");
  186.                         if(f.exists()==false)
  187.                         {
  188.                                 f.mkdirs();
  189.                         }
  190.  
  191.                         if(BODFile.exists()==false)
  192.                         {
  193.                                 if(whatWorld=="/OverWorld")
  194.                                 {
  195.                                     writeBOD(BODFile);
  196.                                 }
  197.                                 if(whatWorld=="/Nether")
  198.                                 {
  199.                                     writeBODnether(BODFile);
  200.                                 }
  201.                                 //System.out.println("write BODprops"); /// for debugging
  202.                         }
  203.                         if(BODbiomesFile.exists()==false && whatWorld=="/OverWorld")
  204.                         {
  205.                                 writeBODbiomes(BODbiomesFile);
  206.                                 //System.out.println("write BODbiomes"); /// for debugging
  207.                         }      
  208.                                    
  209.                         while(BODFile.exists())
  210.                         {
  211.                                 //System.out.println(" 2.3: bod file exists, checking rarity random"); /// for debugging
  212.                                 betterOreDistribution(x_Chunk, z_Chunk, MPBlockID, minableBlockMeta); // gather ore gen values from .txt
  213.                            
  214.                                 if (rarity > 0){rarity = mPBiomeRarity(rarity, x_Chunk, z_Chunk, MPBlockID);} // retrieve rarity for this ore in this biome
  215.                                 if (rarity == 1 || (rarity > 0 && rand.nextInt(rarity) == 0)) // use values
  216.                                 {
  217.                                         //System.out.println(" 2.3.1: rarity passed"); /// for debugging
  218.                                         while(BODFile.exists())
  219.                                         {                                      
  220.                                                 //System.out.println(" 2.3.2: other bod file works"); /// for debugging
  221.                                                 betterOreDistribution(x_Chunk, z_Chunk, MPBlockID, minableBlockMeta); // gather ore gen values from .txt
  222.                                                 //System.out.println("makin a mine at " + (MPChunk_X / 16) + "," + (MPChunk_Z / 16) + ", id " + MPBlockID + "." + minableBlockMeta/* + "-" + MPPrevID3 + "-" + MPPrevID4*/ + ", settings: R " + rarity + ", VS " + veinSi + ", VA " + veinAm + ", H " + height + ", D " + diameter + ", VD " + vDens + ", HD " + hDens); // used for debugging
  223.                                                 //System.out.println("generate veins"); /// for debugging
  224.                                                 if(subMineGen == 1){createMine(worldObj, rand, x_Chunk, z_Chunk);}
  225.                                                 else{createMineWithChance(worldObj, rand, x_Chunk, z_Chunk);}
  226.            
  227.                                                 subMineGen++;
  228.                                                 BODFile = new File(configDirectory + "/" + versionNum + "BOD-Mine["+ mineGen +"."+ subMineGen +"].txt");
  229.                                         }
  230.                                 }
  231.                                 subMineGen = 1;
  232.                                 mineGen++;
  233.                                 BODFile = new File(configDirectory + "/" + versionNum + "BOD-Mine["+ mineGen +"."+ subMineGen +"].txt");
  234.                         }
  235.                 }
  236.                 //else{System.out.println(" checked, and genned before!" + minableBlockId);}// for debugging
  237.         }
  238.         return true;
  239.     }
  240.  
  241.     public int mPCalculateDensity(int oreDistance, float oreDensity) // returns the density value
  242.     {
  243.  
  244.             int loopCount = 0;
  245.             int densityValuePassInner = 0;
  246.             int densityValuePass = 0;
  247.             oreDensity = oreDensity * .01F;
  248.             oreDensity = (oreDensity * (oreDistance >> 1)) + 1F;// establishes number of times to loop
  249.             loopCount = (int)(oreDensity); //stores number of times to loop
  250.             densityValuePassInner = ((oreDistance/loopCount)); // distance devided by number of times it will loop, establishes the number for randomization
  251.             densityValuePassInner += (((oreDistance - (densityValuePassInner*loopCount))/loopCount));
  252.             densityValuePass = 0;
  253.             while (loopCount > 0) // loops to acumulate random values
  254.             {
  255.                     densityValuePass = densityValuePass + rand.nextInt(densityValuePassInner); // acumulate randoms
  256.                     loopCount = loopCount - 1; // decriment loop
  257.             }
  258.             return densityValuePass; // return proccesed random value
  259.     }
  260.  
  261.     public int mPBiomeRarity(int biomeRar, int xChunkBio, int zChunkBio, int MPMinableBlockId)
  262.     {
  263.             //worldChunkManager = worldObj.getWorldChunkManager();
  264.             //BiomeGenBase biomegenbase = worldChunkManager.getBiomeGenAt(xChunkBio, zChunkBio);
  265.            
  266.             Properties props = new Properties();
  267.             int biomeVals = rarity;
  268.             String valPass = "1";
  269.             String valPassB = "1";
  270.             int inc1 = 1;
  271.             try
  272.             {
  273.                     BODbiomesFile = new File(configDirectory + "/" + versionNum + "BOD-Biomes-Mine["+ mineGen +"."+ subMineGen +"].txt"); // setup file // remove  the minecraft directory portion for multiplayer
  274.                     if(BODbiomesFile.exists())
  275.                     {
  276.                             props.load(new FileInputStream(BODbiomesFile));
  277.  
  278.                             valPass = String.valueOf("OreID[" + MPMinableBlockId + "." + minableBlockMeta + "]-BiomeID[" + worldObj.getWorldChunkManager().getBiomeGenAt(xChunkBio, zChunkBio).biomeID + "]"); //  biomegenbase.biomeID
  279.  
  280.                             if (props.getProperty(valPass)!= null) // make sure it exists first
  281.                             {
  282.                                     valPassB = props.getProperty(valPass); // get new rarity value
  283.                                     biomeVals = Integer.valueOf(valPassB);
  284.                             }
  285.                     }
  286.             }
  287.             catch(IOException j)
  288.             {
  289.                     System.out.println("couldnt load BODbiomes"); /// for debugging
  290.             }
  291.                                             /*try
  292.                                                             {
  293.                                                                             File List = new File(Minecraft.getMinecraftDir() + "/BODprops/(V2.4)BiomesList.txt"); // setup file // remove  the minecraft directory portion for multiplayer
  294.                                                                             props.load(new FileInputStream(List));
  295.                                                             }
  296.                                             catch(IOException g)
  297.                                             {
  298.                                                             try // Write Biome ID reference
  299.                                                                             {
  300.                                                                                             BufferedWriter out = new BufferedWriter(new FileWriter(BODFile));
  301.                                                                                             inc1 = 0;
  302.                                                                                             out.write("This file acts as a reference to all Biomes used currently." + "\r\n"  + "To refresh this list, delete this text file, and a new one will be made with updated biomes when new generation takes place");
  303.                                                                                             while (inc1 <= 255)
  304.                                                                                             {
  305.                                                                                             if(biomegenbase.biomeList[inc1] == null){ out.write("ID" + inc1 + ": unused ID" + "\r\n");}
  306.                                                                                             else
  307.                                                                                                             {
  308.                                                                                                                             out.write("Biome ID " + inc1 + ": " + biomegenbase.biomeList[inc1] + "\r\n");
  309.                                                                                                             }
  310.                                                                                             inc1++;
  311.                                                                                             }
  312.                                                                                             out.close();
  313.                                                                             }
  314.                                                             catch(IOException k){}
  315.                                     }*/
  316.             if( valPass != null){biomeRar =  biomeVals ;}
  317.             else {biomeRar = rarity;}
  318.             return biomeRar;
  319.            
  320.     }
  321.        
  322.     public boolean betterOreDistribution(int xChunk, int zChunk, int MPMinableBlockId, int MPMinableBlockMeta)
  323.     {
  324.             //System.out.println("assigning variables"); /// for debugging
  325.             rarity = 2; // make sure all these dont have garbage data in them, for debugging mostly
  326.             veinSi = 2;
  327.             veinAm = 2;
  328.             height = 2;
  329.             mineHeight = 2;
  330.             diameter = 2;
  331.             vDens = 2;
  332.             hDens = 2;
  333.             useMarcoVeins = false;
  334.             String valPass = "1";
  335.  
  336.             Properties props = new Properties();
  337.             //try retrieve data from file
  338.             try
  339.             {
  340.                
  341.                     BODFile = new File(configDirectory + "/" + versionNum + "BOD-Mine["+ mineGen +"."+ subMineGen +"].txt");
  342.                     if(BODFile.exists())
  343.                     {
  344.                             props.load(new FileInputStream(BODFile));
  345.                             // assign value to ore variable only if it is not null
  346.  
  347.                             String valPass1 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "Rarity");
  348.                             String valPass2 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "VeinSize");
  349.                             String valPass3 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "VeinAmount");
  350.                             String valPass4 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "Height");
  351.                             String valPass5 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "VerticalShift");
  352.                             String valPass6 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "Diameter");
  353.                             String valPass7 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "VerticalDensity");
  354.                             String valPass8 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "HorizontalDensity");
  355.                             String valPass9 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "GenOreInBlockID");
  356.                             String valPass10 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "UseMarcoVeins");
  357.                             //System.out.println(MPMinableBlockId + "." + MPMinableBlockMeta + "HorizontalDensity"); /// for debugging
  358.  
  359.                             if(mineGen == 1 && subMineGen == 1 )
  360.                             {
  361.                                     if (props.getProperty(valPass1)== null || props.getProperty(valPass2)== null || props.getProperty(valPass3)== null || props.getProperty(valPass4)== null || props.getProperty(valPass5)== null || props.getProperty(valPass6)== null || props.getProperty(valPass7)== null || props.getProperty(valPass9)== null || props.getProperty(valPass10)== null)
  362.                                     {
  363.                                             try
  364.                                             {
  365.  
  366.                                                     BufferedWriter out = new BufferedWriter(new FileWriter(BODFile,true));
  367.                                                     out.write("#NewBlock" + MPMinableBlockId + "." + MPMinableBlockMeta + "\r\n");
  368.                                                     out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "Rarity=50" + "\r\n");
  369.                                                     out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "VeinSize=10" + "\r\n");
  370.                                                     out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "VeinAmount=70" + "\r\n");
  371.                                                     out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "Height=95" + "\r\n");
  372.                                                     out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "VerticalShift=0" + "\r\n");
  373.                                                     out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "Diameter=48" + "\r\n");
  374.                                                     out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "VerticalDensity=10" + "\r\n");
  375.                                                     out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "HorizontalDensity=10" + "\r\n");
  376.                                                     out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "GenOreInBlockID=1" + "\r\n");
  377.                                                     out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "UseMarcoVeins=false" + "\r\n" + "\r\n");
  378.                                                     out.close();
  379.                                                     //System.out.println(MPMinableBlockId + "." + MPMinableBlockMeta + "HorizontalDensity=10"); /// for debugging
  380.                                             }
  381.                                             catch (IOException h)
  382.                                             {
  383.                                                     System.out.println("couldnt write in new ore settings for ore" + MPMinableBlockId + "." + MPMinableBlockMeta); /// for debugging
  384.                                             }
  385.                                     }
  386.                             }
  387.                             if (props.getProperty(valPass1)!= null){
  388.                             valPass = props.getProperty(valPass1); // rarity
  389.                             rarity = Integer.valueOf(valPass) ; }
  390.                        
  391.                             if (props.getProperty(valPass2) != null){
  392.                             valPass = props.getProperty(valPass2); // size
  393.                             veinSi = Integer.valueOf(valPass) ; }
  394.                        
  395.                             if (props.getProperty(valPass3) != null){
  396.                             valPass = props.getProperty(valPass3); // amount
  397.                             veinAm = Integer.valueOf(valPass) ;      }
  398.                        
  399.                             if (props.getProperty(valPass4) != null){
  400.                             valPass = props.getProperty(valPass4); // height
  401.                             height = Integer.valueOf(valPass) ;      }
  402.                        
  403.                             if (props.getProperty(valPass5) != null){
  404.                             valPass = props.getProperty(valPass5); // mineHeight
  405.                             mineHeight = Integer.valueOf(valPass) ;      }
  406.                        
  407.                             if (props.getProperty(valPass6) != null){
  408.                             valPass = props.getProperty(valPass6); // diameter
  409.                             diameter = Integer.valueOf(valPass) ; }
  410.                        
  411.                             if (props.getProperty(valPass7) != null){
  412.                             valPass = props.getProperty(valPass7); // vertical dense.
  413.                             vDens = Integer.valueOf(valPass) ; }
  414.                        
  415.                             if (props.getProperty(valPass8) != null){
  416.                             valPass = props.getProperty(valPass8); // horiz. dense.
  417.                             hDens = Integer.valueOf(valPass) ; }
  418.                            
  419.                             if (props.getProperty(valPass9) != null){
  420.                             valPass = props.getProperty(valPass9); // Gen. in block
  421.                             genInBlock = Integer.valueOf(valPass) ; }
  422.                            
  423.                             if (props.getProperty(valPass10) != null){
  424.                             valPass = props.getProperty(valPass10); // marco veins?
  425.                             useMarcoVeins = Boolean.valueOf(valPass) ; }
  426.                     }
  427.                     //else{System.out.println("couldnt assign variables, BODfile doesnt exist: " + BODFile);} /// for debugging}
  428.             }                              
  429.  
  430.             //catch exception in case properties file does not exist
  431.             catch(IOException e)
  432.             {
  433.                             System.out.println("assigning variables had an exception!!!"); /// for debugging
  434.             }  
  435.              // all variables set, continue to generate
  436.             return true;
  437.     }
  438.            
  439.     public boolean BODgenerateVein(World world, Random rand, int parX, int parY, int parZ, int xyz)
  440.     {
  441.         //==========================================mp mod
  442.         int posX = parX;
  443.         int posY = parY;
  444.         int posZ = parZ;
  445.         int tempPosX =0;
  446.         int tempPosY =0;
  447.         int tempPosZ =0;
  448.         int posX2 = 0;
  449.         int posY2 = 0;
  450.         int posZ2 = 0;
  451.         int directionX =0;
  452.         int directionY =0;
  453.         int directionZ =0;
  454.         int directionX2 = 0;
  455.         int directionY2 = 0;
  456.         int directionZ2 = 0;
  457.         int directionX3 =0;
  458.         int directionY3 =0;
  459.         int directionZ3 =0;
  460.         int directionChange =0;
  461.         int directionChange2 =0;
  462.         int blocksToUse = xyz;//input number of blocks per vein
  463.         int blocksToUse2 =0;
  464.         for(int blocksMade=0; blocksMade <= blocksToUse;) // make veins
  465.         {
  466.             blocksToUse2 = 1 + (blocksToUse/30);
  467.             directionChange = rand.nextInt(6);
  468.             directionX = rand.nextInt(2);
  469.             directionY = rand.nextInt(2);
  470.             directionZ = rand.nextInt(2);
  471.  
  472.             for(int blocksMade1 = 0; blocksMade1 <= blocksToUse2; ) // make branch
  473.             {
  474.                 if(directionX == 0 && directionChange != 1){posX = posX + rand.nextInt(2);}
  475.                 if(directionX == 1 && directionChange != 1){posX = posX - rand.nextInt(2);}
  476.                 if(directionY == 0 && directionChange != 2){posY = posY + rand.nextInt(2);}
  477.                 if(directionY == 1 && directionChange != 2){posY = posY - rand.nextInt(2);}
  478.                 if(directionZ == 0 && directionChange != 3){posZ = posZ + rand.nextInt(2);}
  479.                 if(directionZ == 1 && directionChange != 3){posZ = posZ - rand.nextInt(2);}
  480.                 if(rand.nextInt(4) == 0){
  481.                     posX2 = posX2 + rand.nextInt(2);
  482.                     posY2 = posY2 + rand.nextInt(2);
  483.                     posZ2 = posZ2 + rand.nextInt(2);
  484.                     posX2 = posX2 - rand.nextInt(2);
  485.                     posY2 = posY2 - rand.nextInt(2);
  486.                     posZ2 = posZ2 - rand.nextInt(2);
  487.                 }
  488.                 if(rand.nextInt(3) == 0) // make sub-branch
  489.                 {
  490.                     posX2 = posX;
  491.                     posY2 = posY;
  492.                     posZ2 = posZ;
  493.  
  494.                     directionX2 = rand.nextInt(2);
  495.                     directionY2 = rand.nextInt(2);
  496.                     directionZ2 = rand.nextInt(2);
  497.                     directionChange2 = rand.nextInt(6);
  498.                     if(directionX2 == 0 && directionChange2 != 0){posX2 = posX2 + rand.nextInt(2);}
  499.                     if(directionY2 == 0 && directionChange2 != 1){posY2 = posY2 + rand.nextInt(2);}
  500.                     if(directionZ2 == 0 && directionChange2 != 2){posZ2 = posZ2 + rand.nextInt(2);}
  501.                     if(directionX2 == 1 && directionChange2 != 0){posX2 = posX2 - rand.nextInt(2);}
  502.                     if(directionY2 == 1 && directionChange2 != 1){posY2 = posY2 - rand.nextInt(2);}
  503.                     if(directionZ2 == 1 && directionChange2 != 2){posZ2 = posZ2 - rand.nextInt(2);}
  504.  
  505.  
  506.  
  507.                     for(int blocksMade2 = 0; blocksMade2 <= (1 +(blocksToUse2/5)); )
  508.                     {
  509.  
  510.                         if(directionX2 == 0 && directionChange2 != 0){posX2 = posX2 + rand.nextInt(2);}
  511.                         if(directionY2 == 0 && directionChange2 != 1){posY2 = posY2 + rand.nextInt(2);}
  512.                         if(directionZ2 == 0 && directionChange2 != 2){posZ2 = posZ2 + rand.nextInt(2);}
  513.                         if(directionX2 == 1 && directionChange2 != 0){posX2 = posX2 - rand.nextInt(2);}
  514.                         if(directionY2 == 1 && directionChange2 != 1){posY2 = posY2 - rand.nextInt(2);}
  515.                         if(directionZ2 == 1 && directionChange2 != 2){posZ2 = posZ2 - rand.nextInt(2);}
  516.                         if(world.getBlockId(posX, posY, posZ) == Block.stone.blockID || world.getBlockId(posX, posY, posZ) == 87)
  517.                         {
  518.                             world.setBlock(posX, posY, posZ, MPBlockID, minableBlockMeta, 2);
  519.                         }
  520.                         blocksMade++;
  521.                         blocksMade1++;
  522.                         blocksMade2++;
  523.                     }
  524.                 }
  525.  
  526.                 if(world.getBlockId(posX, posY, posZ) == Block.stone.blockID || world.getBlockId(posX, posY, posZ) == 87)
  527.                 {
  528.                     world.setBlock(posX, posY, posZ, MPBlockID, minableBlockMeta, 2);
  529.                 }
  530.  
  531.                 blocksMade++;
  532.                 blocksMade1++;
  533.  
  534.             }
  535.  
  536.             parX = parX + (rand.nextInt(3) - 1);
  537.             parY = parY + (rand.nextInt(3) - 1);
  538.             parZ = parZ + (rand.nextInt(3) - 1);
  539.             posX = parX;
  540.             posY = parY;
  541.             posZ = parZ;
  542.  
  543.         }
  544.  
  545.  
  546.         return true;
  547.     }  
  548.    
  549.     public boolean BODgenerate(World world, Random rand, int par3, int par4, int par5, int xyz)
  550.     {
  551.  
  552.             //==========================================mp mod
  553.             numberOfBlocks = xyz; //input number of blocks per vein
  554.  
  555.             //==========================================mp mod
  556.             float var6 = rand.nextFloat() * (float)Math.PI;
  557.             double var7 = (double)((float)(par3 + 8) + MathHelper.sin(var6) * (float)numberOfBlocks / 8.0F);
  558.             double var9 = (double)((float)(par3 + 8) - MathHelper.sin(var6) * (float)numberOfBlocks / 8.0F);
  559.             double var11 = (double)((float)(par5 + 8) + MathHelper.cos(var6) * (float)numberOfBlocks / 8.0F);
  560.             double var13 = (double)((float)(par5 + 8) - MathHelper.cos(var6) * (float)numberOfBlocks / 8.0F);
  561.             double var15 = (double)(par4 + rand.nextInt(3) - 2);
  562.             double var17 = (double)(par4 + rand.nextInt(3) - 2);
  563.  
  564.             for (int var19 = 0; var19 <= numberOfBlocks; ++var19)
  565.             {
  566.                     double var20 = var7 + (var9 - var7) * (double)var19 / (double)numberOfBlocks;
  567.                     double var22 = var15 + (var17 - var15) * (double)var19 / (double)numberOfBlocks;
  568.                     double var24 = var11 + (var13 - var11) * (double)var19 / (double)numberOfBlocks;
  569.                     double var26 = rand.nextDouble() * (double)this.numberOfBlocks / 16.0D;
  570.                     double var28 = (double)(MathHelper.sin((float)var19 * (float)Math.PI / (float)numberOfBlocks) + 1.0F) * var26 + 1.0D;
  571.                     double var30 = (double)(MathHelper.sin((float)var19 * (float)Math.PI / (float)numberOfBlocks) + 1.0F) * var26 + 1.0D;
  572.                     int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
  573.                     int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
  574.                     int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
  575.                     int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
  576.                     int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
  577.                     int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
  578.  
  579.                     for (int var38 = var32; var38 <= var35; ++var38)
  580.                     {
  581.                             double var39 = ((double)var38 + 0.5D - var20) / (var28 / 2.0D);
  582.  
  583.                             if (var39 * var39 < 1.0D)
  584.                             {
  585.                                     for (int var41 = var33; var41 <= var36; ++var41)
  586.                                     {
  587.                                             double var42 = ((double)var41 + 0.5D - var22) / (var30 / 2.0D);
  588.  
  589.                                             if (var39 * var39 + var42 * var42 < 1.0D)
  590.                                             {
  591.                                                     for (int var44 = var34; var44 <= var37; ++var44)
  592.                                                     {
  593.                                                             double var45 = ((double)var44 + 0.5D - var24) / (var28 / 2.0D);
  594.  
  595.                                                             Block block = Block.blocksList[world.getBlockId(var38, var41, var44)];
  596.                                                             //if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D && (block != null && block.isGenMineableReplaceable(par1World, k2, l2, i3, field_94523_c)))
  597.                                                             if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && (block != null && (world.getBlockId(var38, var41, var44) == genInBlock)))
  598.                                                             {
  599.                                                                     //world.setBlockAndMetadata(var38, var41, var44, minableBlockId, minableBlockMeta);
  600.                                                                 world.setBlock(var38, var41, var44, minableBlockId, minableBlockMeta, 2);
  601.                                                                     //System.out.println("block at " + var38 +" "+var41+" "+var44); /// for debugging
  602.                                                             }
  603.                                                     }
  604.                                             }
  605.                                     }
  606.                             }
  607.                     }
  608.             }
  609.             //System.out.println("a vein was placed " + minableBlockId + "." + minableBlockMeta+ " at " + par3 +" "+par4+" "+par5); /// for debugging
  610.             return true;
  611.     }
  612.        
  613.         public boolean writeBODoverrides(File writeTo)
  614.         {
  615.             try // write BOD(<version>).txt
  616.             {
  617.                 BufferedWriter out = new BufferedWriter(new FileWriter(writeTo));
  618.                 out.write("# format:" + "\r\n");
  619.                 out.write("# X.add_new_ore=Y:Z" + "\r\n");
  620.                 out.write("# X = the override number, start counting from 1. once the progam doesnt see the next number it stops, so dont do 1, 2, 3, 5 because it will stop at 3" + "\r\n");
  621.                 out.write("# Y = the block ID" + "\r\n");
  622.                 out.write("# Z = the block meta data, almost all vanilla blocks are 0, with exceptions like colored wool, and half slabs" + "\r\n");
  623.                 out.write("# Note: If you enter an ID that isn't a block, then it will get stuck on Building terrain, or crash. This is an override after all" + "\r\n");
  624.                 out.write("1.add_new_ore=129:0" + "\r\n");
  625.                 out.close();
  626.             }
  627.             catch (IOException f)
  628.             {
  629.                 System.out.println("could not write BODoverrides"); /// for debugging
  630.             }
  631.             return true;
  632.         }
  633.         public boolean writeBODnetherOverrides(File writeTo)
  634.         {
  635.             try // write BOD(<version>).txt
  636.             {
  637.                 BufferedWriter out = new BufferedWriter(new FileWriter(writeTo));
  638.                 out.write("# format:" + "\r\n");
  639.                 out.write("# X.add_new_ore=Y:Z" + "\r\n");
  640.                 out.write("# X = the override number, start counting from 1. once the progam doesnt see the next number it stops, so dont do 1, 2, 3, 5 because it will stop at 3" + "\r\n");
  641.                 out.write("# Y = the block ID" + "\r\n");
  642.                 out.write("# Z = the block meta data, almost all vanilla blocks are 0, with exceptions like colored wool, and half slabs" + "\r\n");
  643.                 out.write("# Note: If you enter an ID that isn't a block, then it will get stuck on Building terrain, or crash. This is an override after all" + "\r\n");
  644.                 out.close();
  645.             }
  646.             catch (IOException f)
  647.             {
  648.                 System.out.println("could not write BODoverrides"); /// for debugging
  649.             }
  650.             return true;
  651.         }
  652.         public boolean writeBOD(File writeTo)
  653.         {
  654.             try // write BOD(<version>).txt
  655.             {
  656.                 BufferedWriter out = new BufferedWriter(new FileWriter(writeTo));
  657.                 out.write("#see forum for more instructions: http://www.minecraftforum.net/topic/330485-10-marcopolos-mods/" + "\r\n");
  658.                 out.write("#format X.Ysetting=Z" + "\r\n");
  659.                 out.write("# X = block ID" + "\r\n");
  660.                 out.write("# Y = meta data" + "\r\n");
  661.                 out.write("# Z = value for setting" + "\r\n");
  662.                
  663.                 out.write("#Dirt" + "\r\n"); // dirt
  664.                 out.write("3.0Rarity=50" + "\r\n");
  665.                 out.write("3.0VeinSize=30" + "\r\n");
  666.                 out.write("3.0VeinAmount=17" + "\r\n");
  667.                 out.write("3.0Height=128" + "\r\n");
  668.                 out.write("3.0VerticalShift=0" + "\r\n");
  669.                 out.write("3.0Diameter=32" + "\r\n");
  670.                 out.write("3.0VerticalDensity=1" + "\r\n");
  671.                 out.write("3.0HorizontalDensity=1" + "\r\n");
  672.                 out.write("3.0GenOreInBlockID=1"+ "\r\n");
  673.                 out.write("3.0UseMarcoVeins=false" + "\r\n"  + "\r\n");
  674.    
  675.                 out.write("#Gravel" + "\r\n"); // gravel
  676.                 out.write("13.0Rarity=50" + "\r\n");
  677.                 out.write("13.0VeinSize=30" + "\r\n");
  678.                 out.write("13.0VeinAmount=17" + "\r\n");
  679.                 out.write("13.0Height=128" + "\r\n");
  680.                 out.write("13.0VerticalShift=0" + "\r\n");
  681.                 out.write("13.0Diameter=32" + "\r\n");
  682.                 out.write("13.0VerticalDensity=1" + "\r\n");
  683.                 out.write("13.0HorizontalDensity=1" + "\r\n");
  684.                 out.write("13.0GenOreInBlockID=1"+ "\r\n");
  685.                 out.write("13.0UseMarcoVeins=false" + "\r\n"  + "\r\n");
  686.                
  687.                 out.write("#Gold" + "\r\n"); // gold
  688.                 out.write("14.0Rarity=140" + "\r\n");
  689.                 out.write("14.0VeinSize=8" + "\r\n");
  690.                 out.write("14.0VeinAmount=135" + "\r\n");
  691.                 out.write("14.0Height=80" + "\r\n");
  692.                 out.write("14.0VerticalShift=0" + "\r\n");
  693.                 out.write("14.0Diameter=60" + "\r\n");
  694.                 out.write("14.0VerticalDensity=20" + "\r\n");
  695.                 out.write("14.0HorizontalDensity=10" + "\r\n");
  696.                 out.write("14.0GenOreInBlockID=1"+ "\r\n");
  697.                 out.write("14.0UseMarcoVeins=false" + "\r\n"  + "\r\n");
  698.                  
  699.                 out.write("#Iron" + "\r\n"); // Iron
  700.                 out.write("15.0Rarity=75" + "\r\n");
  701.                 out.write("15.0VeinSize=8" + "\r\n");
  702.                 out.write("15.0VeinAmount=220" + "\r\n");
  703.                 out.write("15.0Height=80" + "\r\n");
  704.                 out.write("15.0VerticalShift=0" + "\r\n");
  705.                 out.write("15.0Diameter=65" + "\r\n");
  706.                 out.write("15.0VerticalDensity=15" + "\r\n");
  707.                 out.write("15.0HorizontalDensity=15" + "\r\n");
  708.                 out.write("15.0GenOreInBlockID=1"+ "\r\n");
  709.                 out.write("15.0UseMarcoVeins=false" + "\r\n"  + "\r\n");
  710.                
  711.                 out.write("#Coal" + "\r\n"); // coal
  712.                 out.write("16.0Rarity=80" + "\r\n");
  713.                 out.write("16.0VeinSize=7" + "\r\n");
  714.                 out.write("16.0VeinAmount=330" + "\r\n");
  715.                 out.write("16.0Height=6" + "\r\n");
  716.                 out.write("16.0VerticalShift=45" + "\r\n");
  717.                 out.write("16.0Diameter=70" + "\r\n");
  718.                 out.write("16.0VerticalDensity=85" + "\r\n");
  719.                 out.write("16.0HorizontalDensity=10" + "\r\n");
  720.                 out.write("16.0GenOreInBlockID=1"+ "\r\n");
  721.                 out.write("16.0UseMarcoVeins=false" + "\r\n"  + "\r\n");
  722.                    
  723.                 out.write("#Lapis" + "\r\n"); // lapis
  724.                 out.write("21.0Rarity=225" + "\r\n");
  725.                 out.write("21.0VeinSize=8" + "\r\n");
  726.                 out.write("21.0VeinAmount=200" + "\r\n");
  727.                 out.write("21.0Height=50" + "\r\n");
  728.                 out.write("21.0VerticalShift=0" + "\r\n");
  729.                 out.write("21.0Diameter=70" + "\r\n");
  730.                 out.write("21.0VerticalDensity=20" + "\r\n");
  731.                 out.write("21.0HorizontalDensity=10" + "\r\n");
  732.                 out.write("21.0GenOreInBlockID=1"+ "\r\n");
  733.                 out.write("21.0UseMarcoVeins=false" + "\r\n"  + "\r\n");
  734.                
  735.                 out.write("#Diamond" + "\r\n"); // daimond
  736.                 out.write("56.0Rarity=160" + "\r\n");
  737.                 out.write("56.0VeinSize=8" + "\r\n");
  738.                 out.write("56.0VeinAmount=220" + "\r\n");
  739.                 out.write("56.0Height=70" + "\r\n");
  740.                 out.write("56.0VerticalShift=0" + "\r\n");
  741.                 out.write("56.0Diameter=70" + "\r\n");
  742.                 out.write("56.0VerticalDensity=20" + "\r\n");
  743.                 out.write("56.0HorizontalDensity=10" + "\r\n");
  744.                 out.write("56.0GenOreInBlockID=1"+ "\r\n");
  745.                 out.write("56.0UseMarcoVeins=false" + "\r\n"  + "\r\n");
  746.                
  747.                 out.write("#Redstone" + "\r\n"); // redstone
  748.                 out.write("73.0Rarity=110" + "\r\n");
  749.                 out.write("73.0VeinSize=12" + "\r\n");
  750.                 out.write("73.0VeinAmount=160" + "\r\n");
  751.                 out.write("73.0Height=12" + "\r\n");
  752.                 out.write("73.0VerticalShift=0" + "\r\n");
  753.                 out.write("73.0Diameter=160" + "\r\n");
  754.                 out.write("73.0VerticalDensity=20" + "\r\n");
  755.                 out.write("73.0HorizontalDensity=5"+ "\r\n");
  756.                 out.write("73.0GenOreInBlockID=1"+ "\r\n");
  757.                 out.write("73.0UseMarcoVeins=false" + "\r\n"  + "\r\n");
  758.                
  759.                 out.write("#Emerald" + "\r\n"); // emerald
  760.                 out.write("129.0Rarity=110" + "\r\n");
  761.                 out.write("129.0VeinSize=3" + "\r\n");
  762.                 out.write("129.0VeinAmount=600" + "\r\n");
  763.                 out.write("129.0Height=60" + "\r\n");
  764.                 out.write("129.0VerticalShift=0" + "\r\n");
  765.                 out.write("129.0Diameter=60" + "\r\n");
  766.                 out.write("129.0VerticalDensity=20" + "\r\n");
  767.                 out.write("129.0HorizontalDensity=5"+ "\r\n");
  768.                 out.write("129.0GenOreInBlockID=1"+ "\r\n");
  769.                 out.write("129.0UseMarcoVeins=false" + "\r\n"  + "\r\n");
  770.                 out.close();
  771.             }
  772.             catch (IOException f)
  773.             {
  774.                 System.out.println("could not write BODprops"); /// for debugging
  775.             }
  776.             return true;
  777.         }
  778.         public boolean writeBODnether(File writeTo)
  779.         {
  780.             try // write BOD(<version>).txt
  781.             {
  782.                 BufferedWriter out = new BufferedWriter(new FileWriter(writeTo));
  783.                 out.write("#see forum for more instructions: http://www.minecraftforum.net/topic/330485-10-marcopolos-mods/" + "\r\n");
  784.                 out.write("#format X.Ysetting=Z" + "\r\n");
  785.                 out.write("# X = block ID" + "\r\n");
  786.                 out.write("# Y = meta data" + "\r\n");
  787.                 out.write("# Z = value for setting" + "\r\n");
  788.                
  789.                 out.write("#Dirt" + "\r\n"); // dirt
  790.                 out.write("153.0Rarity=50" + "\r\n");
  791.                 out.write("153.0VeinSize=100" + "\r\n");
  792.                 out.write("153.0VeinAmount=20" + "\r\n");
  793.                 out.write("153.0Height=128" + "\r\n");
  794.                 out.write("153.0VerticalShift=0" + "\r\n");
  795.                 out.write("153.0Diameter=32" + "\r\n");
  796.                 out.write("153.0VerticalDensity=15" + "\r\n");
  797.                 out.write("153.0HorizontalDensity=15" + "\r\n");
  798.                 out.write("153.0GenOreInBlockID=87"+ "\r\n");
  799.                 out.write("153.0UseMarcoVeins=true" + "\r\n"  + "\r\n");
  800.                 out.close();
  801.                     }
  802.                     catch (IOException f)
  803.                     {
  804.                         System.out.println("could not write BODprops"); /// for debugging
  805.                     }
  806.                     return true;
  807.         }
  808.         public boolean writeBODbiomes(File writeTo)
  809.         {
  810.                 try
  811.                 {
  812.                     BufferedWriter out = new BufferedWriter(new FileWriter(writeTo));
  813.                     out.write("# 3.0=dirt, 13.0=gravel, 14.0=gold, 15.0=iron, 16.0=coal, 21.0=lapis, 56.0=diamond, 73.0=redstone, 129.0=emerald" + "\r\n");
  814.                     out.write("\r\n");
  815.                     out.write("# ------------------------------------------------------------"+"\r\n");
  816.                     out.write("# format is OreID[X.Xo]-BiomeID[Y]=Z" + "\r\n");
  817.                     out.write("# X = Ore ID"+"\r\n");
  818.                     out.write("# Xo = meta data for Ore ID"+"\r\n");
  819.                     out.write("# Y = Biome ID"+"\r\n");
  820.                     out.write("# Z = the rarity you want for that ore in that biome"+"\r\n");
  821.                     out.write("# ------------------------------------------------------------"+"\r\n");
  822.                     out.write("\r\n");
  823.                     out.write("#-----------Ocean 0" + "\r\n");
  824.                     out.write("OreID[21.0]-BiomeID[0]=75" + "\r\n");
  825.                     out.write("\r\n");
  826.                
  827.                     out.write("#-----------Plains 1" + "\r\n");
  828.                     out.write("OreID[3.0]-BiomeID[1]=15" + "\r\n");
  829.                     out.write("OreID[13.0]-BiomeID[1]=15" + "\r\n");
  830.                     out.write("\r\n");
  831.                
  832.                     out.write("#-----------Desert 2" + "\r\n");
  833.                     out.write("OreID[15.0]-BiomeID[2]=37" + "\r\n");
  834.                     out.write("\r\n");
  835.                
  836.                     out.write("#-----------extremeHills 3" + "\r\n");
  837.                     out.write("OreID[14.0]-BiomeID[3]=70" + "\r\n");
  838.                     out.write("OreID[129.0]-BiomeID[3]=50" + "\r\n");
  839.                     out.write("\r\n");
  840.                
  841.                     out.write("#-----------Forest 4" + "\r\n");
  842.                     out.write("OreID[15.0]-BiomeID[4]=37" + "\r\n");
  843.                     out.write("\r\n");
  844.                
  845.                     out.write("#-----------Taiga 5" + "\r\n");
  846.                     out.write("OreID[16.0]-BiomeID[5]=42" + "\r\n");
  847.                     out.write("\r\n");
  848.                
  849.                     out.write("#-----------Swampland 6" + "\r\n");
  850.                     out.write("OreID[73.0]-BiomeID[6]=55" + "\r\n");
  851.                     out.write("\r\n");
  852.                
  853.                     out.write("#-----------River 7" + "\r\n");
  854.                     out.write("OreID[14.0]-BiomeID[7]=70" + "\r\n");
  855.                     out.write("\r\n");
  856.                
  857.                     out.write("#-----------FrozenOcean 10" + "\r\n");
  858.                     out.write("\r\n");
  859.                
  860.                     out.write("#-----------FrozenRiver 11" + "\r\n");
  861.                     out.write("\r\n");
  862.                
  863.                     out.write("#-----------IcePlains 12" + "\r\n");
  864.                     out.write("\r\n");
  865.                
  866.                     out.write("#-----------IceMountain 13" + "\r\n");
  867.                     out.write("\r\n");
  868.                
  869.                     out.write("#-----------MushroomIsland 14" + "\r\n");
  870.                     out.write("OreID[13.0]-BiomeID[14]=40" + "\r\n");
  871.                     out.write("OreID[14.0]-BiomeID[14]=50" + "\r\n");
  872.                     out.write("OreID[15.0]-BiomeID[14]=50" + "\r\n");
  873.                     out.write("OreID[16.0]-BiomeID[14]=50" + "\r\n");
  874.                     out.write("OreID[21.0]-BiomeID[14]=50" + "\r\n");
  875.                     out.write("OreID[56.0]-BiomeID[14]=50" + "\r\n");
  876.                     out.write("OreID[73.0]-BiomeID[14]=50" + "\r\n");
  877.                     out.write("\r\n");
  878.                     out.write("#-----------mushroomshore 15" + "\r\n");
  879.                     out.write("\r\n");
  880.                     out.write("#-----------Beach 16" + "\r\n");
  881.                     out.write("\r\n");
  882.                     out.write("#-----------DesertHills 17" + "\r\n");
  883.                     out.write("\r\n");
  884.                     out.write("#-----------ForestHills 18" + "\r\n");
  885.                     out.write("\r\n");
  886.                     out.write("#-----------taigaHills 19" + "\r\n");
  887.                     out.write("\r\n");
  888.                     out.write("#-----------ExtremeHillsEdge 20" + "\r\n");
  889.                     out.write("\r\n");
  890.                     out.write("#-----------Jungle 21" + "\r\n");
  891.                     out.write("\r\n");
  892.                     out.write("#-----------JungleHills 22" + "\r\n");
  893.                     out.write("\r\n");
  894.                
  895.                     out.close();
  896.                 }
  897.                 catch(IOException i)
  898.                 {
  899.                     System.out.println("could not write BODbiomes!!!"); /// for debugging
  900.                 }
  901.                 return true;
  902.         }
  903.  
  904. //==========================================mp mod
  905. //private static int[] aOreCheck = new int[256];// setup array to store oreIDs for this chunk // has to be static to survive instance calls                
  906. //private static int[] metaOreCheck = new int[16];// this is used to check the metaIDs of a given ore ID
  907. private static ArrayList oreList = new ArrayList();
  908. public static int MPChunk_X;
  909. public static int MPChunk_Z;
  910. private int x_Chunk;
  911. private int z_Chunk;
  912. public int MPBlockID;
  913. private int minableBlockMeta;
  914. public static int MPPrevX;
  915. public static int MPPrevZ;
  916. public static int MPPrevID;
  917. public static int MPPrevMeta;
  918. //public static int MPPrevID3;
  919. //public static int MPPrevID4;
  920. private static boolean genBeforeCheck;
  921. public static int mineCount;
  922. public static int mineCountM;
  923.  
  924. private static Random randomOut;
  925. private static Random rand;
  926. private static World worldObj;
  927. private File BODFileOres;
  928. static File BODFile;
  929. static File configDirectory;
  930. static File BODbiomesFile;
  931. private static String whatWorld = "/OverWorld";
  932. String versionNum = "V(2.6)";
  933. private static WorldChunkManager worldChunkManager;
  934. private static WorldChunkManagerHell worldChunkManagerHell;
  935.  
  936. private int mineGen = 1;
  937. private int subMineGen = 1;
  938. private int rarity = 2;
  939. private int veinSi = 2;
  940. private int veinAm = 2;
  941. private int height = 2;
  942. private int mineHeight = 2;
  943. private int diameter = 2;
  944. private int vDens = 2;
  945. private int hDens = 2;
  946. private int genInBlock = 1;
  947. private boolean useMarcoVeins = false;
  948.  
  949.  
  950. //==========================================mp mod
  951. private int minableBlockId;
  952. private int numberOfBlocks;
  953. private int field_94523_c;
  954. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement