Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //world gen minable
- package net.minecraft.src;
- import java.io.*;
- import java.util.*;
- import net.minecraft.client.Minecraft; // remove for multiplayer server
- import java.util.Random;
- import java.util.Arrays;
- // Referenced classes of package net.minecraft.src:
- // WorldGenerator, MathHelper, World, Block
- public class WorldGenMinable extends WorldGenerator
- {
- public WorldGenMinable(int i, int j)
- {
- minableBlockId = i;
- }
- public WorldGenMinable(int id, int meta, int number)
- {
- this(id, number);
- minableBlockMeta = meta;
- }
- public boolean generateBeforeCheck() // takes a set of current global variables and checks to see if this ore has spawned before in this chunk
- {
- genBeforeCheck = false;
- genBeforeCheck = oreList.contains(Arrays.asList(MPBlockID, minableBlockMeta));
- if(oreList.contains(Arrays.asList(MPBlockID, minableBlockMeta)) == false)
- {
- oreList.add(Arrays.asList(MPBlockID, minableBlockMeta));
- }
- return genBeforeCheck;
- }
- public boolean generate(World world, Random random, int i, int j, int k)//obsorb default system
- {
- configDirectory = new File(Minecraft.getMinecraftDir() + "");// used for switching the code to multiplayer
- //configDirectory = new File(new File(".").getAbsolutePath()); // used for switching the code to multiplayer
- // System.out.println(" 1: call "+minableBlockId+":"+minableBlockMeta); // for debugging
- randomOut = random; // pad the seed so it's the same as vannila
- randomOut.nextFloat(); // |
- randomOut.nextInt(3); // |
- randomOut.nextInt(3); // |
- randomOut.nextDouble();// |
- if (minableBlockId==3)// this makes sure everything is on a once per ore gen basis, because dirt generates first it sets everything up
- {
- //System.out.println(" 1.2: found dirt, setting up"); /// for debugging
- MPChunk_X =((i / 16) * 16);// set output chunk x // snap to grid
- MPChunk_Z =((k / 16) * 16);// set output chunk z
- /*----*/ Random randomz = new Random(world.getSeed()); // setup a random for BOD
- long l = (randomz.nextLong() / 2L) * 2L + 1L; // |
- long l1 = (randomz.nextLong() / 2L) * 2L + 1L; // |
- randomz.setSeed((long)i * l + (long)j * l1 ^ world.getSeed()); // |
- /*----*/ rand = randomz;
- worldObj = world; // set world
- mineCount = 0; // this is a new chunk, so list gets set to the beginning
- oreList.clear(); // clear the list of ores, this is a new chunk
- }
- MPBlockID = minableBlockId;// set output block ID
- if(MPChunk_X != MPPrevX || MPChunk_Z != MPPrevZ || MPPrevID != MPBlockID || minableBlockMeta != MPPrevMeta)// if it is a new x or y chunk, then generate // blockID stops dirt
- {
- //System.out.println(" 2: allowed ore chunk prev test"); /// for debugging
- if (generateBeforeCheck() == false)
- {
- //System.out.println(" 2.2: procede with gen"); /// for debugging315 56 298
- MPPrevX = MPChunk_X;
- MPPrevZ = MPChunk_Z;
- x_Chunk = MPChunk_X;
- z_Chunk = MPChunk_Z;
- MPPrevID = MPBlockID;
- MPPrevMeta = minableBlockMeta;
- mineGen = 1;
- subMineGen = 1;
- BODFile = new File(configDirectory + "/BODprops/" + versionNum + "BOD-Mine[1.1].txt");
- BODFileOres = BODFile;
- BODbiomesFile = new File(configDirectory + "/BODprops/" + versionNum + "BODbiomes-Mine[1.1].txt");
- File f=new File(configDirectory + "/BODprops"); // remove minecraft directy portion for multiplayer
- if(f.exists()==false)
- {
- f.mkdirs();
- }
- if(BODFile.exists()==false)
- {
- writeBOD(BODFile);
- //System.out.println("write BODprops"); /// for debugging
- }
- if(BODbiomesFile.exists()==false)
- {
- writeBODbiomes(BODbiomesFile);
- //System.out.println("write BODbiomes"); /// for debugging
- }
- while(BODFile.exists())
- {
- //System.out.println(" 2.3: bod file exists, checking rarity random"); /// for debugging
- betterOreDistribution(x_Chunk, z_Chunk, MPBlockID, minableBlockMeta); // gather ore gen values from .txt
- if (rarity > 0){rarity = mPBiomeRarity(rarity, x_Chunk, z_Chunk, MPBlockID);} // retrieve rarity for this ore in this biome
- if (rarity == 1 || rarity > 0 && rand.nextInt(rarity) == 0 ) // use values
- {
- //System.out.println(" 2.3.1: rarity passed"); /// for debugging
- while(BODFile.exists())
- {
- //System.out.println(" 2.3.2: other bod file works"); /// for debugging
- betterOreDistribution(x_Chunk, z_Chunk, MPBlockID, minableBlockMeta); // gather ore gen values from .txt
- 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
- //System.out.println("generate veins"); /// for debugging
- for(int loopCount = 0; loopCount < veinAm; loopCount++)
- {
- int temp1 = mPCalculateDensity(diameter, hDens);
- int temp2 = mineHeight + mPCalculateDensity(height, vDens);
- int temp3 = mPCalculateDensity(diameter, hDens);
- int l5 = x_Chunk + temp1;
- int i9 = temp2;
- int k13 = z_Chunk + temp3;
- BODgenerate(worldObj, rand, l5, i9, k13, veinSi); // generate based on values
- }
- subMineGen++;
- BODFile = new File(configDirectory + "/BODprops/" + versionNum + "BOD-Mine["+ mineGen +"."+ subMineGen +"].txt");
- }
- }
- subMineGen = 1;
- mineGen++;
- BODFile = new File(configDirectory + "/BODprops/" + versionNum + "BOD-Mine["+ mineGen +"."+ subMineGen +"].txt");
- }
- }
- //else{System.out.println(" checked, and genned before!");}// for debugging
- }
- return true;
- }
- public int mPCalculateDensity(int oreDistance, float oreDensity) // returns the density value
- {
- int loopCount = 0;
- int densityValuePassInner = 0;
- int densityValuePass = 0;
- oreDensity = oreDensity * .01F;
- oreDensity = (oreDensity * (oreDistance >> 1)) + 1F;// establishes number of times to loop
- loopCount = (int)(oreDensity); //stores number of times to loop
- densityValuePassInner = (int)((oreDistance/oreDensity)+.5F); // distance devided by number of times it will loop, establishes the number for randomization
- densityValuePass = 0;
- while (loopCount > 0) // loops to acumulate random values
- {
- densityValuePass = densityValuePass + rand.nextInt(densityValuePassInner); // acumulate randoms
- loopCount = loopCount - 1; // decriment loop
- }
- return densityValuePass; // return proccesed random value
- }
- public int mPBiomeRarity(int biomeRar, int xChunkBio, int zChunkBio, int MPMinableBlockId)
- {
- if(worldObj.getWorldChunkManager() != null)
- {
- worldChunkManager = worldObj.getWorldChunkManager();
- BiomeGenBase biomegenbase = worldChunkManager.getBiomeGenAt(xChunkBio, zChunkBio);
- Properties props = new Properties();
- int biomeVals = rarity;
- String valPass = "1";
- String valPassB = "1";
- int inc1 = 1;
- try
- {
- BODbiomesFile = new File(configDirectory + "/BODprops/" + versionNum + "BODbiomes-Mine["+ mineGen +"."+ subMineGen +"].txt"); // setup file // remove the minecraft directory portion for multiplayer
- if(BODbiomesFile.exists())
- {
- props.load(new FileInputStream(BODbiomesFile));
- valPass = String.valueOf("OreID[" + MPMinableBlockId + "." + minableBlockMeta + "]-BiomeID[" + biomegenbase.biomeID + "]");
- if (props.getProperty(valPass)!= null) // make sure it exists first
- {
- valPassB = props.getProperty(valPass); // get new rarity value
- biomeVals = Integer.valueOf(valPassB);
- }
- }
- }
- catch(IOException j)
- {
- System.out.println("couldnt load BODbiomes"); /// for debugging
- }
- /*try
- {
- File List = new File(Minecraft.getMinecraftDir() + "/BODprops/(V2.4)BiomesList.txt"); // setup file // remove the minecraft directory portion for multiplayer
- props.load(new FileInputStream(List));
- }
- catch(IOException g)
- {
- try // Write Biome ID reference
- {
- BufferedWriter out = new BufferedWriter(new FileWriter(BODFile));
- inc1 = 0;
- 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");
- while (inc1 <= 255)
- {
- if(biomegenbase.biomeList[inc1] == null){ out.write("ID" + inc1 + ": unused ID" + "\r\n");}
- else
- {
- out.write("Biome ID " + inc1 + ": " + biomegenbase.biomeList[inc1] + "\r\n");
- }
- inc1++;
- }
- out.close();
- }
- catch(IOException k){}
- }*/
- if( valPass != null){biomeRar = biomeVals ;}
- else {biomeRar = rarity;}
- return biomeRar;
- }
- else {return rarity;}
- }
- public boolean betterOreDistribution(int xChunk, int zChunk, int MPMinableBlockId, int MPMinableBlockMeta)
- {
- //System.out.println("assigning variables"); /// for debugging
- rarity = 2;
- veinSi = 2;
- veinAm = 2;
- height = 2;
- mineHeight = 2;
- diameter = 2;
- vDens = 2;
- hDens = 2;
- String valPass = "1";
- Properties props = new Properties();
- //try retrieve data from file
- try
- {
- BODFile = new File(configDirectory + "/BODprops/" + versionNum + "BOD-Mine["+ mineGen +"."+ subMineGen +"].txt");
- if(BODFile.exists())
- {
- props.load(new FileInputStream(BODFile));
- // assign value to ore variable only if it is not null
- String valPass1 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "Rarity");
- String valPass2 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "VeinSize");
- String valPass3 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "VeinAmount");
- String valPass4 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "Height");
- String valPass8 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "MineHeight");
- String valPass5 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "Diameter");
- String valPass6 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "VerticalDensity");
- String valPass7 = String.valueOf(MPMinableBlockId + "." + MPMinableBlockMeta + "HorizontalDensity");
- //System.out.println(MPMinableBlockId + "." + MPMinableBlockMeta + "HorizontalDensity"); /// for debugging
- if(mineGen == 1 && subMineGen == 1 )
- {
- 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)
- {
- try
- {
- BufferedWriter out = new BufferedWriter(new FileWriter(BODFile,true));
- out.write("#NewBlock" + MPMinableBlockId + "\r\n");
- out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "Rarity=50" + "\r\n");
- out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "VeinSize=10" + "\r\n");
- out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "VeinAmount=70" + "\r\n");
- out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "Height=95" + "\r\n");
- out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "MineHeight=0" + "\r\n");
- out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "Diameter=48" + "\r\n");
- out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "VerticalDensity=10" + "\r\n");
- out.write(MPMinableBlockId + "." + MPMinableBlockMeta + "HorizontalDensity=10" + "\r\n" + "\r\n");
- out.close();
- //System.out.println(MPMinableBlockId + "." + MPMinableBlockMeta + "HorizontalDensity=10"); /// for debugging
- }
- catch (IOException h)
- {
- System.out.println("couldnt write in new ore settings for ore" + MPMinableBlockId + "." + MPMinableBlockMeta); /// for debugging
- }
- }
- }
- if (props.getProperty(valPass1)!= null){
- valPass = props.getProperty(valPass1); // rarity
- rarity = Integer.valueOf(valPass) ; }
- if (props.getProperty(valPass2) != null){
- valPass = props.getProperty(valPass2); // size
- veinSi = Integer.valueOf(valPass) ; }
- if (props.getProperty(valPass3) != null){
- valPass = props.getProperty(valPass3); // amount
- veinAm = Integer.valueOf(valPass) ; }
- if (props.getProperty(valPass4) != null){
- valPass = props.getProperty(valPass4); // height
- height = Integer.valueOf(valPass) ; }
- if (props.getProperty(valPass8) != null){
- valPass = props.getProperty(valPass8); // mineHeight
- mineHeight = Integer.valueOf(valPass) ; }
- if (props.getProperty(valPass5) != null){
- valPass = props.getProperty(valPass5); // diameter
- diameter = Integer.valueOf(valPass) ; }
- if (props.getProperty(valPass6) != null){
- valPass = props.getProperty(valPass6); // vertical dense.
- vDens = Integer.valueOf(valPass) ; }
- if (props.getProperty(valPass7) != null){
- valPass = props.getProperty(valPass7); // horiz. dense.
- hDens = Integer.valueOf(valPass) ; }
- }
- //else{System.out.println("couldnt assign variables, BODfile doesnt exist: " + BODFile);} /// for debugging}
- }
- //catch exception in case properties file does not exist
- catch(IOException e)
- {
- System.out.println("assigning variables had an exception!!!"); /// for debugging
- }
- // all variables set, continue to generate
- return true;
- }
- public boolean BODgenerate(World world, Random rand, int par3, int par4, int par5, int xyz)
- {
- //==========================================mp mod
- numberOfBlocks = xyz; //input number of blocks per vein
- //==========================================mp mod
- float var6 = rand.nextFloat() * (float)Math.PI;
- double var7 = (double)((float)(par3 + 8) + MathHelper.sin(var6) * (float)numberOfBlocks / 8.0F);
- double var9 = (double)((float)(par3 + 8) - MathHelper.sin(var6) * (float)numberOfBlocks / 8.0F);
- double var11 = (double)((float)(par5 + 8) + MathHelper.cos(var6) * (float)numberOfBlocks / 8.0F);
- double var13 = (double)((float)(par5 + 8) - MathHelper.cos(var6) * (float)numberOfBlocks / 8.0F);
- double var15 = (double)(par4 + rand.nextInt(3) - 2);
- double var17 = (double)(par4 + rand.nextInt(3) - 2);
- for (int var19 = 0; var19 <= numberOfBlocks; ++var19)
- {
- double var20 = var7 + (var9 - var7) * (double)var19 / (double)numberOfBlocks;
- double var22 = var15 + (var17 - var15) * (double)var19 / (double)numberOfBlocks;
- double var24 = var11 + (var13 - var11) * (double)var19 / (double)numberOfBlocks;
- double var26 = rand.nextDouble() * (double)this.numberOfBlocks / 16.0D;
- double var28 = (double)(MathHelper.sin((float)var19 * (float)Math.PI / (float)numberOfBlocks) + 1.0F) * var26 + 1.0D;
- double var30 = (double)(MathHelper.sin((float)var19 * (float)Math.PI / (float)numberOfBlocks) + 1.0F) * var26 + 1.0D;
- int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
- int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
- int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
- int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
- int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
- int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
- for (int var38 = var32; var38 <= var35; ++var38)
- {
- double var39 = ((double)var38 + 0.5D - var20) / (var28 / 2.0D);
- if (var39 * var39 < 1.0D)
- {
- for (int var41 = var33; var41 <= var36; ++var41)
- {
- double var42 = ((double)var41 + 0.5D - var22) / (var30 / 2.0D);
- if (var39 * var39 + var42 * var42 < 1.0D)
- {
- for (int var44 = var34; var44 <= var37; ++var44)
- {
- double var45 = ((double)var44 + 0.5D - var24) / (var28 / 2.0D);
- Block block = Block.blocksList[world.getBlockId(var38, var41, var44)];
- //if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && (block != null && block.isGenMineableReplaceable(par1World, var38, var41, var44)))
- if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && (block != null && (world.getBlockId(var38, var41, var44) == Block.stone.blockID || world.getBlockId(var38, var41, var44) == 87 || world.getBlockId(var38, var41, var44) == 121)))
- {
- world.setBlockAndMetadata(var38, var41, var44, minableBlockId, minableBlockMeta);
- //System.out.println("block at " + var38 +" "+var41+" "+var44); /// for debugging
- }
- }
- }
- }
- }
- }
- }
- //System.out.println("a vein was placed " + minableBlockId + "." + minableBlockMeta+ " at " + par3 +" "+par4+" "+par5); /// for debugging
- return true;
- }
- public boolean writeBOD(File writeTo)
- {
- try // write BOD(<version>).txt
- {
- BufferedWriter out = new BufferedWriter(new FileWriter(writeTo));
- out.write("#see forum for more instructions: http://www.minecraftforum.net/topic/330485-132spsmp-marcopolos-mods-better-ore-distributionv25beta3-trap-friendly-cactus-and-practical-tnt/" + "\r\n");
- out.write("#format X.Ysetting=Z" + "\r\n");
- out.write("# X = block ID" + "\r\n");
- out.write("# Y = meta data" + "\r\n");
- out.write("# Z = value for setting" + "\r\n");
- out.write("#Dirt" + "\r\n"); // dirt
- out.write("3.0Rarity=50" + "\r\n");
- out.write("3.0VeinSize=30" + "\r\n");
- out.write("3.0VeinAmount=17" + "\r\n");
- out.write("3.0Height=128" + "\r\n");
- out.write("3.0MineHeight=0" + "\r\n");
- out.write("3.0Diameter=32" + "\r\n");
- out.write("3.0VerticalDensity=15" + "\r\n");
- out.write("3.0HorizontalDensity=10" + "\r\n" + "\r\n");
- out.write("#Gravel" + "\r\n"); // gravel
- out.write("13.0Rarity=50" + "\r\n");
- out.write("13.0VeinSize=30" + "\r\n");
- out.write("13.0VeinAmount=17" + "\r\n");
- out.write("13.0Height=128" + "\r\n");
- out.write("13.0MineHeight=0" + "\r\n");
- out.write("13.0Diameter=32" + "\r\n");
- out.write("13.0VerticalDensity=15" + "\r\n");
- out.write("13.0HorizontalDensity=10" + "\r\n" + "\r\n");
- out.write("#Gold" + "\r\n"); // gold
- out.write("14.0Rarity=140" + "\r\n");
- out.write("14.0VeinSize=8" + "\r\n");
- out.write("14.0VeinAmount=135" + "\r\n");
- out.write("14.0Height=80" + "\r\n");
- out.write("14.0MineHeight=0" + "\r\n");
- out.write("14.0Diameter=60" + "\r\n");
- out.write("14.0VerticalDensity=20" + "\r\n");
- out.write("14.0HorizontalDensity=10" + "\r\n" + "\r\n");
- out.write("#Iron" + "\r\n"); // Iron
- out.write("15.0Rarity=75" + "\r\n");
- out.write("15.0VeinSize=8" + "\r\n");
- out.write("15.0VeinAmount=220" + "\r\n");
- out.write("15.0Height=80" + "\r\n");
- out.write("15.0MineHeight=0" + "\r\n");
- out.write("15.0Diameter=65" + "\r\n");
- out.write("15.0VerticalDensity=15" + "\r\n");
- out.write("15.0HorizontalDensity=15" + "\r\n" + "\r\n");
- out.write("#Coal" + "\r\n"); // coal
- out.write("16.0Rarity=95" + "\r\n");
- out.write("16.0VeinSize=7" + "\r\n");
- out.write("16.0VeinAmount=300" + "\r\n");
- out.write("16.0Height=2" + "\r\n");
- out.write("16.0MineHeight=45" + "\r\n");
- out.write("16.0Diameter=70" + "\r\n");
- out.write("16.0VerticalDensity=85" + "\r\n");
- out.write("16.0HorizontalDensity=10" + "\r\n" + "\r\n");
- out.write("#Lapis" + "\r\n"); // lapis
- out.write("21.0Rarity=225" + "\r\n");
- out.write("21.0VeinSize=8" + "\r\n");
- out.write("21.0VeinAmount=200" + "\r\n");
- out.write("21.0Height=50" + "\r\n");
- out.write("21.0MineHeight=0" + "\r\n");
- out.write("21.0Diameter=70" + "\r\n");
- out.write("21.0VerticalDensity=20" + "\r\n");
- out.write("21.0HorizontalDensity=10" + "\r\n" + "\r\n");
- out.write("#Diamond" + "\r\n"); // daimond
- out.write("56.0Rarity=160" + "\r\n");
- out.write("56.0VeinSize=8" + "\r\n");
- out.write("56.0VeinAmount=220" + "\r\n");
- out.write("56.0Height=70" + "\r\n");
- out.write("56.0MineHeight=0" + "\r\n");
- out.write("56.0Diameter=70" + "\r\n");
- out.write("56.0VerticalDensity=20" + "\r\n");
- out.write("56.0HorizontalDensity=10" + "\r\n" + "\r\n");
- out.write("#Redstone" + "\r\n"); // redstone
- out.write("73.0Rarity=110" + "\r\n");
- out.write("73.0VeinSize=12" + "\r\n");
- out.write("73.0VeinAmount=160" + "\r\n");
- out.write("73.0Height=12" + "\r\n");
- out.write("73.0MineHeight=0" + "\r\n");
- out.write("73.0Diameter=160" + "\r\n");
- out.write("73.0VerticalDensity=20" + "\r\n");
- out.write("73.0HorizontalDensity=5" + "\r\n" + "\r\n");
- out.close();
- }
- catch (IOException f)
- {
- System.out.println("could not write BODprops"); /// for debugging
- }
- return true;
- }
- public boolean writeBODbiomes(File writeTo)
- {
- try
- {
- BufferedWriter out = new BufferedWriter(new FileWriter(writeTo));
- 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" + "\r\n");
- out.write("\r\n");
- out.write("# ------------------------------------------------------------"+"\r\n");
- out.write("# format is OreID[X.Xo]-BiomeID[Y]=Z" + "\r\n");
- out.write("# X = Ore ID"+"\r\n");
- out.write("# Xo = meta data for Ore ID"+"\r\n");
- out.write("# Y = Biome ID"+"\r\n");
- out.write("# Z = the rarity you want for that ore in that biome"+"\r\n");
- out.write("# ------------------------------------------------------------"+"\r\n");
- out.write("\r\n");
- out.write("#-----------Ocean 0" + "\r\n");
- out.write("OreID[21.0]-BiomeID[0]=75" + "\r\n");
- out.write("\r\n");
- out.write("#-----------Plains 1" + "\r\n");
- out.write("OreID[3.0]-BiomeID[1]=25" + "\r\n");
- out.write("\r\n");
- out.write("#-----------Desert 2" + "\r\n");
- out.write("OreID[15.0]-BiomeID[2]=37" + "\r\n");
- out.write("\r\n");
- out.write("#-----------extremeHills 3" + "\r\n");
- out.write("OreID[14.0]-BiomeID[3]=70" + "\r\n");
- out.write("\r\n");
- out.write("#-----------Forest 4" + "\r\n");
- out.write("OreID[15.0]-BiomeID[4]=37" + "\r\n");
- out.write("\r\n");
- out.write("#-----------Taiga 5" + "\r\n");
- out.write("OreID[16.0]-BiomeID[5]=42" + "\r\n");
- out.write("\r\n");
- out.write("#-----------Swampland 6" + "\r\n");
- out.write("OreID[73.0]-BiomeID[6]=55" + "\r\n");
- out.write("\r\n");
- out.write("#-----------River 7" + "\r\n");
- out.write("OreID[14.0]-BiomeID[7]=70" + "\r\n");
- out.write("\r\n");
- out.write("#-----------FrozenOcean 10" + "\r\n");
- out.write("\r\n");
- out.write("#-----------FrozenRiver 11" + "\r\n");
- out.write("\r\n");
- out.write("#-----------IcePlains 12" + "\r\n");
- out.write("\r\n");
- out.write("#-----------IceMountain 13" + "\r\n");
- out.write("\r\n");
- out.write("#-----------MushroomIsland 14" + "\r\n");
- out.write("OreID[13.0]-BiomeID[14]=40" + "\r\n");
- out.write("OreID[14.0]-BiomeID[14]=50" + "\r\n");
- out.write("OreID[15.0]-BiomeID[14]=50" + "\r\n");
- out.write("OreID[16.0]-BiomeID[14]=50" + "\r\n");
- out.write("OreID[21.0]-BiomeID[14]=50" + "\r\n");
- out.write("OreID[56.0]-BiomeID[14]=50" + "\r\n");
- out.write("OreID[73.0]-BiomeID[14]=50" + "\r\n");
- out.write("\r\n");
- out.write("#-----------mushroomshore 15" + "\r\n");
- out.write("\r\n");
- out.write("#-----------Beach 16" + "\r\n");
- out.write("\r\n");
- out.write("#-----------DesertHills 17" + "\r\n");
- out.write("\r\n");
- out.write("#-----------ForestHills 18" + "\r\n");
- out.write("\r\n");
- out.write("#-----------taigaHills 19" + "\r\n");
- out.write("\r\n");
- out.write("#-----------ExtremeHillsEdge 20" + "\r\n");
- out.write("\r\n");
- out.write("#-----------Jungle 21" + "\r\n");
- out.write("\r\n");
- out.write("#-----------JungleHills 22" + "\r\n");
- out.write("\r\n");
- out.close();
- }
- catch(IOException i)
- {
- System.out.println("could not write BODbiomes!!!"); /// for debugging
- }
- return true;
- }
- //==========================================mp mod
- //private static int[] aOreCheck = new int[256];// setup array to store oreIDs for this chunk // has to be static to survive instance calls
- //private static int[] metaOreCheck = new int[16];// this is used to check the metaIDs of a given ore ID
- private static ArrayList oreList = new ArrayList();
- public static int MPChunk_X;
- public static int MPChunk_Z;
- private int x_Chunk;
- private int z_Chunk;
- public int MPBlockID;
- private int minableBlockMeta;
- public static int MPPrevX;
- public static int MPPrevZ;
- public static int MPPrevID;
- public static int MPPrevMeta;
- //public static int MPPrevID3;
- //public static int MPPrevID4;
- private static boolean genBeforeCheck;
- public static int mineCount;
- public static int mineCountM;
- private static Random randomOut;
- private static Random rand;
- private static World worldObj;
- private File BODFileOres;
- static File BODFile;
- static File configDirectory;
- static File BODbiomesFile;
- String versionNum = "V(2.5.2)";
- private static WorldChunkManager worldChunkManager;
- private static WorldChunkManagerHell worldChunkManagerHell;
- private int mineGen = 1;
- private int subMineGen = 1;
- private int rarity = 2;
- private int veinSi = 2;
- private int veinAm = 2;
- private int height = 2;
- private int mineHeight = 2;
- private int diameter = 2;
- private int vDens = 2;
- private int hDens = 2;
- //==========================================mp mod
- private int minableBlockId;
- private int numberOfBlocks;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement