package hmggirlfront.world;

import java.util.Random;

import hmggirlfront.mod_GirlFront;
import net.minecraft.block.Block;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.WorldProviderEnd;
import net.minecraft.world.WorldProviderHell;
import net.minecraft.world.WorldProviderSurface;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeDesert;
import net.minecraft.world.biome.BiomeForest;
import net.minecraft.world.biome.BiomeHills;
import net.minecraft.world.biome.BiomeJungle;
import net.minecraft.world.biome.BiomeMesa;
import net.minecraft.world.biome.BiomeOcean;
import net.minecraft.world.biome.BiomePlains;
import net.minecraft.world.biome.BiomeProvider;
import net.minecraft.world.biome.BiomeSavanna;
import net.minecraft.world.biome.BiomeSnow;
import net.minecraft.world.biome.BiomeTaiga;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.IChunkGenerator;
import net.minecraftforge.fml.common.IWorldGenerator;

public class WorldGenerator_BulldingBase implements IWorldGenerator {

	public Block ore;
	public int maxh;
	public int minh;
	public int kazu;
	public int kazura;
	public boolean generatorhell;
	public boolean generatorsky;
	//public BiomeGenBase[] biomegenbase;
	public int stack;

	public WorldGenerator_BulldingBase() {
	}

	@Override
	public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator,
			IChunkProvider chunkProvider) {
		BiomeProvider worldchunkmanager = world.getBiomeProvider();
		if (worldchunkmanager != null) {

			if (world.provider instanceof WorldProviderSurface) {
				this.generateOre(world, random, chunkX << 4, chunkZ << 4);
			}

			if (this.generatorhell) {
				if (world.provider instanceof WorldProviderHell) {
					this.generateOreHell(world, random, chunkX << 4, chunkZ << 4);
				}
			}

			if (this.generatorsky) {
				if (world.provider instanceof WorldProviderEnd) {
					this.generateOreEnd(world, random, chunkX << 4, chunkZ << 4);
				}
			}
		}
	}

	private void generateOre(World world, Random random, int x, int z) {
		
		
		{
			BlockPos spawn = world.getSpawnPoint();
			WorldBlockBase var1 = new WorldBlockBase(100);
				/*int genX =  x + random.nextInt(16); 
				int genZ =  z + random.nextInt(16); 
				BlockPos bp = world.getHeight(new BlockPos(genX, 64 + random.nextInt(100), genZ));
				int genY = bp.getY(); */
				//if(genY > 60)
			int genX =  x; 
			int genZ =  z; 
			BlockPos bp = world.getHeight(new BlockPos(genX, 50 + random.nextInt(100), genZ));
			//BlockPos bp = world.getHeight(new BlockPos(spawn.getX(), 64+ random.nextInt(120), spawn.getX()));
			Chunk chunk = world.getChunkFromBlockCoords(bp);
			Chunk chunk2 = world.getChunkFromBlockCoords(spawn);
			if(chunk == chunk2)
				{
					var1.generate(world, random, new BlockPos(spawn.getX(), bp.getY(), spawn.getZ())); 
				 } 
		}
		
		{//　物資
			int genX =  x + random.nextInt(16); 
			int genZ =  z + random.nextInt(16); 
			BlockPos bp = world.getHeight(new BlockPos(genX, 60 + random.nextInt(100), genZ));
			int genY = bp.getY(); //world.getChunksLowestHorizon(genX, genZ);
			if(random.nextInt(mod_GirlFront.cfg_building_rand_goods) == 0 && genY > 60)
			{
				if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomePlains 
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeTaiga
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeJungle
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSavanna
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeMesa)
				{
					WorldBlockBase var1 = new WorldBlockBase(200);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
				}
			}
		}
		
		
		
		boolean old_system = false;
		
		
		if(old_system)
	{}else{
			
		}
		
		/*{
			//　観測基地のみランダム生成で
			{//　大型基地
				int genX =  x + random.nextInt(16); 
				int genZ =  z + random.nextInt(16); 
				BlockPos bp = world.getHeight(new BlockPos(genX, 60 + random.nextInt(100), genZ));
				int genY = bp.getY(); //world.getChunksLowestHorizon(genX, genZ);
				if(random.nextInt(mod_GirlFront.cfg_building_rand_base) == 0 && genY > 60)
				{
					if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeMesa
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSavanna)
					{
						WorldBlockBase var1 = new WorldBlockBase(8);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
				}
			}
		}*/
		
		
		if(mod_GirlFront.cfg_building_intervals) {//一定間隔式
			BlockPos spawn = world.getSpawnPoint();
			boolean sp = false;
			Chunk ch = world.getChunkFromChunkCoords(x >> 4, z >> 4);
			//Chunk ch = world.getChunkFromChunkCoords(x, z);
			Chunk ch2 = world.getChunkFromBlockCoords(spawn);
			if(ch == ch2)sp = true;
			
			int genX = x + 0;
			int genZ = z + 0;
			BlockPos bp = world.getHeight(new BlockPos(genX, 64 + random.nextInt(100), genZ));
			int genY = bp.getY(); //world.getChunksLowestHorizon(genX, genZ);
			boolean canbuild = true;
			int ran1 = mod_GirlFront.cfg_building_base_range;//896
			int ran2 = mod_GirlFront.cfg_building_base_range;//896
			if(Math.abs(genX) %ran1 == 0 && Math.abs(genZ) %ran1 == 0 && !sp && genY > 60) {//　大型基地
				
				 if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeHills || world.getBiome(new BlockPos(genX,genY, genZ)) == Biome.getBiome(19))
					{
						WorldBlockBase var1 = new WorldBlockBase(9);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
				 else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeTaiga
						 || (world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest && (world.getBiome(bp) != Biome.getBiome(29) && world.getBiome(bp) != Biome.getBiome(157))))
				{
					WorldBlockBase var1 = new WorldBlockBase(2);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
				}
				else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeJungle
						||(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest 
						&& (world.getBiome(bp) == Biome.getBiome(29) || world.getBiome(bp) == Biome.getBiome(157))))
				{
					WorldBlockBase var1 = new WorldBlockBase(4);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
				}
				else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeDesert)
				{
					WorldBlockBase var1 = new WorldBlockBase(3);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
				}
				else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeMesa
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSavanna)
				{
					WorldBlockBase var1 = new WorldBlockBase(8);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
				}
				else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeOcean)
				{
					WorldBlockBase var1 = new WorldBlockBase(7);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
				}
				else {
					/*if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomePlains 
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSavanna
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeMesa)*///
					{
						WorldBlockBase var1 = new WorldBlockBase(1);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
				}
				canbuild = false;
			}
			//　小規模
			if((Math.abs(genX) %32 == 16 && Math.abs(genZ) %32 == 16) && canbuild) 
			{
				if(random.nextInt(mod_GirlFront.cfg_building_rand) == 0 && genY > 60)
				{
					if (world.getBiome(new BlockPos(genX, genY, genZ)) instanceof BiomeDesert) {
						
						WorldBlockBase var1 = new WorldBlockBase(21);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
					} else if (world.getBiome(new BlockPos(genX, genY, genZ)) instanceof BiomeTaiga
							|| world.getBiome(new BlockPos(genX, genY, genZ)) instanceof BiomeSnow
							|| world.getBiome(bp) == Biome.getBiome(13) || world.getBiome(bp) == Biome.getBiome(31)) {
						
						WorldBlockBase var1 = new WorldBlockBase(22);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
					} else if (world.getBiome(new BlockPos(genX, genY, genZ)) instanceof BiomeHills) {
						
						WorldBlockBase var1 = new WorldBlockBase(23);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
						} else if (world.getBiome(new BlockPos(genX, genY, genZ)) instanceof BiomeOcean) {
						
						WorldBlockBase var1 = new WorldBlockBase(24);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
					} else if (world.getBiome(new BlockPos(genX, genY, genZ)) instanceof BiomePlains
							|| world.getBiome(new BlockPos(genX, genY, genZ)) instanceof BiomeForest
							|| world.getBiome(new BlockPos(genX, genY, genZ)) instanceof BiomeJungle
							|| world.getBiome(new BlockPos(genX, genY, genZ)) instanceof BiomeSavanna
							|| world.getBiome(new BlockPos(genX, genY, genZ)) instanceof BiomeMesa) {
						
						WorldBlockBase var1 = new WorldBlockBase(0);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
				}
			}
		}else {
			{//　大型基地
				int genX =  x + random.nextInt(16); 
				int genZ =  z + random.nextInt(16); 
				BlockPos bp = world.getHeight(new BlockPos(genX, 60 + random.nextInt(100), genZ));
				int genY = bp.getY(); //world.getChunksLowestHorizon(genX, genZ);
				if(random.nextInt(mod_GirlFront.cfg_building_rand_base) == 0 && genY > 60)
				{
					/*if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomePlains 
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeTaiga
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeJungle
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSavanna
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeMesa)
					{
						WorldBlockBase var1 = new WorldBlockBase(1);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
					if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeDesert 
							)
					{
						WorldBlockBase var1 = new WorldBlockBase(3);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}*/
					 if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeHills || world.getBiome(new BlockPos(genX,genY, genZ)) == Biome.getBiome(19))
						{
							WorldBlockBase var1 = new WorldBlockBase(9);
								var1.generate(world, random, new BlockPos(genX, genY, genZ));
						}
					 else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeTaiga
							 || (world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest && (world.getBiome(bp) != Biome.getBiome(29) && world.getBiome(bp) != Biome.getBiome(157))))
					{
						WorldBlockBase var1 = new WorldBlockBase(2);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
					else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeJungle
							||(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest 
							&& (world.getBiome(bp) == Biome.getBiome(29) || world.getBiome(bp) == Biome.getBiome(157))))
					{
						WorldBlockBase var1 = new WorldBlockBase(4);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
					else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeDesert)
					{
						WorldBlockBase var1 = new WorldBlockBase(3);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
					/*else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeMesa
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSavanna)
					{
						WorldBlockBase var1 = new WorldBlockBase(8);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}*/
					else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeOcean)
					{
						WorldBlockBase var1 = new WorldBlockBase(7);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}else {
						/*if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomePlains 
								|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSavanna
								|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeMesa)*///
						{
							WorldBlockBase var1 = new WorldBlockBase(1);
								var1.generate(world, random, new BlockPos(genX, genY, genZ));
						}
					}
				}
			}
			{//　小型基地
				int genX =  x + random.nextInt(16); 
				int genZ =  z + random.nextInt(16); 
				BlockPos bp = world.getHeight(new BlockPos(genX, 60 + random.nextInt(100), genZ));
				int genY = bp.getY(); //world.getChunksLowestHorizon(genX, genZ);
				if(random.nextInt(mod_GirlFront.cfg_building_rand) == 0 && genY > 60)
				{
					/*if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomePlains 
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeTaiga
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeJungle
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSavanna
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeMesa)
					{
						WorldBlockBase var1 = new WorldBlockBase(0);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}*/
					 if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeDesert)
					{
							WorldBlockBase var1 = new WorldBlockBase(21);
								var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
					 else  if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeTaiga
							 || world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSnow
							 || world.getBiome(bp) == Biome.getBiome(13)
							 || world.getBiome(bp) == Biome.getBiome(31))
					{
							WorldBlockBase var1 = new WorldBlockBase(22);
								var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
					 else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomePlains 
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeJungle
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSavanna
							|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeMesa)
					{
						WorldBlockBase var1 = new WorldBlockBase(0);
							var1.generate(world, random, new BlockPos(genX, genY, genZ));
					}
				}
			}
		}
		
		
		
		/*{//　大型基地
			int genX =  x + random.nextInt(16); 
			int genZ =  z + random.nextInt(16); 
			BlockPos bp = world.getHeight(new BlockPos(genX, 60 + random.nextInt(100), genZ));
			int genY = bp.getY(); //world.getChunksLowestHorizon(genX, genZ);
			if(random.nextInt(mod_GirlFront.cfg_building_rand_base) == 0 && genY > 60)
			{
				if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomePlains 
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeTaiga
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeJungle
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeSavanna
						|| world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeMesa)
				{
					WorldBlockBase var1 = new WorldBlockBase(1);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
				}
				if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeDesert 
						)
				{
					WorldBlockBase var1 = new WorldBlockBase(3);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
				}
			}
		}*/
		
		
		/*BlockPos spawn = world.getSpawnPoint();
		boolean sp = false;
		Chunk ch = world.getChunkFromChunkCoords(x >> 4, z >> 4);
		//Chunk ch = world.getChunkFromChunkCoords(x, z);
		Chunk ch2 = world.getChunkFromBlockCoords(spawn);
		if(ch == ch2)sp = true;
		
		int genX = x + 0;
		int genZ = z + 0;
		BlockPos bp = world.getHeight(new BlockPos(genX, 64 + random.nextInt(100), genZ));
		int genY = bp.getY(); //world.getChunksLowestHorizon(genX, genZ);
		boolean canbuild = true;
		int ran1 = 512;//896
		int ran2 = 512;//896
		if(Math.abs(genX) %ran1 == 0 && Math.abs(genZ) %ran1 == 0 && !sp && genY > 60) {
			if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeTaiga
					 || world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeJungle)
			{
				WorldBlockBase var1 = new WorldBlockBase(2);
					var1.generate(world, random, new BlockPos(genX, genY, genZ));
					canbuild = false;
			}
			else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest)
			{
				WorldBlockBase var1 = new WorldBlockBase(4);
					var1.generate(world, random, new BlockPos(genX, genY, genZ));
					canbuild = false;
			}
			else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeDesert)
			{
				WorldBlockBase var1 = new WorldBlockBase(3);
					var1.generate(world, random, new BlockPos(genX, genY, genZ));
					canbuild = false;
			}
			else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeOcean)
			{
				WorldBlockBase var1 = new WorldBlockBase(7);
					var1.generate(world, random, new BlockPos(genX, genY, genZ));
					canbuild = false;
			}else {
				{
					WorldBlockBase var1 = new WorldBlockBase(1);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
						canbuild = false;
				}
			}
		}
		if(Math.abs(genX) %ran1 == Math.abs(ran1 / 2) && Math.abs(genZ) %ran1 == Math.abs(ran1 * 0.865D) && !sp && genY > 60) {
			if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeTaiga
					 || world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeJungle)
			{
				WorldBlockBase var1 = new WorldBlockBase(2);
					var1.generate(world, random, new BlockPos(genX, genY, genZ));
					canbuild = false;
			}
			else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeForest)
			{
				WorldBlockBase var1 = new WorldBlockBase(4);
					var1.generate(world, random, new BlockPos(genX, genY, genZ));
					canbuild = false;
			}
			else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeDesert)
			{
				WorldBlockBase var1 = new WorldBlockBase(3);
					var1.generate(world, random, new BlockPos(genX, genY, genZ));
					canbuild = false;
			}
			else if(world.getBiome(new BlockPos(genX,genY, genZ)) instanceof BiomeOcean)
			{
				WorldBlockBase var1 = new WorldBlockBase(7);
					var1.generate(world, random, new BlockPos(genX, genY, genZ));
					canbuild = false;
			}else {
				{
					WorldBlockBase var1 = new WorldBlockBase(1);
						var1.generate(world, random, new BlockPos(genX, genY, genZ));
						canbuild = false;
				}
			}
		}*/
		
		
		
		
		
		
		
		
		
		//小型基地
		/*{
			WorldBlockBase var1 = new WorldBlockBase(0);
				int genX =  x + random.nextInt(16); 
				int genZ =  z + random.nextInt(16); 
				BlockPos bp = world.getHeight(new BlockPos(genX, 64 + random.nextInt(100), genZ));
				int genY = bp.getY(); 
					Biome[] biomeList = null;
					String biomeNameList[] = new String[] { "plains", "forest", "taiga", "swampland", "jungle", "taiga_cold", "savanna", "mesa"};
					biomeList = new Biome[biomeNameList.length];
				for (int i=0; i<biomeNameList.length; i++) biomeList[i] = Biome.REGISTRY.getObject(new ResourceLocation(biomeNameList[i]));
		 		{
						if(random.nextInt(mod_GirlFront.cfg_building_rand) == 0 && genY > 60)
						{
							{
								for(Biome biome : biomeList)
								{
									if(biome!=null)
									{
										if(world.getBiomeForCoordsBody(new BlockPos(genX,genY, genZ)) == biome)
										{
									var1.generate(world, random, new BlockPos(genX, genY, genZ)); 
										}
									}
								}
							}
						}
				 } 
		}
		//残骸
		{
			WorldBlockBase var1 = new WorldBlockBase(2);
				int genX =  x + random.nextInt(16); 
				int genZ =  z + random.nextInt(16); 
				BlockPos bp = world.getHeight(new BlockPos(genX, 64 + random.nextInt(100), genZ));
				int genY = bp.getY(); 
					Biome[] biomeList = null;
					String biomeNameList[] = new String[] { "plains", "forest", "taiga", "swampland", "jungle", "taiga_cold", "savanna", "mesa"};
					biomeList = new Biome[biomeNameList.length];
				for (int i=0; i<biomeNameList.length; i++) biomeList[i] = Biome.REGISTRY.getObject(new ResourceLocation(biomeNameList[i]));
		 		{
						if(random.nextInt(mod_GirlFront.cfg_building_rand_goods) == 0 && genY > 60)
						{
							{
								for(Biome biome : biomeList)
								{
									if(biome!=null)
									{
										if(world.getBiomeForCoordsBody(new BlockPos(genX,genY, genZ)) == biome)
										{
									var1.generate(world, random, new BlockPos(genX, genY, genZ)); 
										}
									}
								}
							}
						}
				 } 
		}
		//基地
		{
			WorldBlockBase var1 = new WorldBlockBase(1);
				int genX =  x + random.nextInt(16); 
				int genZ =  z + random.nextInt(16); 
				BlockPos bp = world.getHeight(new BlockPos(genX, 64 + random.nextInt(100), genZ));
				int genY = bp.getY(); 
					Biome[] biomeList = null;
					String biomeNameList[] = new String[] { "plains", "forest", "taiga", "swampland", "jungle", "taiga_cold", "savanna", "mesa"};
					biomeList = new Biome[biomeNameList.length];
				for (int i=0; i<biomeNameList.length; i++) biomeList[i] = Biome.REGISTRY.getObject(new ResourceLocation(biomeNameList[i]));
		 		{
						if(random.nextInt(mod_GirlFront.cfg_building_rand_base) == 0 && genY > 60)
						{
							{
								for(Biome biome : biomeList)
								{
									if(biome!=null)
									{
										if(world.getBiomeForCoordsBody(new BlockPos(genX,genY, genZ)) == biome)
										{
									var1.generate(world, random, new BlockPos(genX, genY, genZ)); 
										}
									}
								}
							}
						}
				 } 
		}*/
		
	}

	private void generateOreHell(World world, Random random, int x, int z) {
		/*{
			for (int i = 0; i < kazu; ++i) {
				int genX = x + random.nextInt(16);
				int genY = 0 + random.nextInt(60);
				int genZ = z + random.nextInt(16);

				// if(maxh > minh)
				{
					(new WorldGenMinable(this.ore.getDefaultState(), this.kazura, BlockHelper.forBlock(Blocks.stone)))
							.generate(world, random, new BlockPos(genX, genY, genZ));
				}
			}
		}*/
	}

	private void generateOreEnd(World world, Random random, int x, int z) 
 	{ 
 		/*{ 
	 		for (int i = 0; i < kazu; ++i) 
	 		{ 
	 			int genX =  x + random.nextInt(16); 
	 			int genY = 0 + random.nextInt(60); 
	 			int genZ =  z + random.nextInt(16); 

	 			//if(maxh > minh)
	 			{
	 			(new WorldGenMinable(this.ore.getDefaultState(),this.kazura,BlockHelper.forBlock(Blocks.stone))).generate(world, random, new BlockPos( genX, genY, genZ)); 
	 			}
	 			} 
 		}*/
 	}

	


}
