Permalink
Browse files

Added world generation for the new ores

  • Loading branch information...
Ri5ux committed Dec 18, 2017
1 parent 8e798e5 commit cf1d1e262ae9686b0b4042c6694ee33b462a416d
Showing with 14 additions and 2 deletions.
  1. +14 −2 src/main/java/org/avp/world/worldgen/WorldGenerator.java
@@ -26,11 +26,23 @@ public void generate(Random seed, int chunkX, int chunkZ, World world, IChunkGen
private void generateSurface(World world, Random rand, int chunkX, int chunkZ)
{
BlockPos chunkCoords = new BlockPos(chunkX, 0, chunkZ);
Biome biome = world.getBiome(new BlockPos(chunkX, 0, chunkZ));
Biome[] overworldBiomes = new Biome[] { Biomes.BEACH, Biomes.BIRCH_FOREST, Biomes.BIRCH_FOREST_HILLS, Biomes.COLD_BEACH, Biomes.COLD_TAIGA, Biomes.COLD_TAIGA_HILLS, Biomes.DESERT, Biomes.DESERT_HILLS, Biomes.EXTREME_HILLS, Biomes.EXTREME_HILLS_EDGE, Biomes.EXTREME_HILLS_WITH_TREES, Biomes.FOREST, Biomes.FOREST_HILLS, Biomes.FROZEN_OCEAN, Biomes.FROZEN_RIVER, Biomes.ICE_MOUNTAINS, Biomes.ICE_PLAINS, Biomes.JUNGLE, Biomes.JUNGLE_EDGE, Biomes.JUNGLE_HILLS, Biomes.PLAINS, Biomes.RIVER, Biomes.ROOFED_FOREST, Biomes.SWAMPLAND, Biomes.TAIGA, Biomes.TAIGA_HILLS, Biomes.OCEAN, Biomes.DEEP_OCEAN
};
Worlds.generateInBiome(world, new WorldGenMinable(AliensVsPredator.blocks().oreBauxite.getDefaultState(), 4), rand, 20, 16, 128, chunkCoords, overworldBiomes);
Worlds.generateInBiome(world, new WorldGenMinable(AliensVsPredator.blocks().oreCopper.getDefaultState(), 4), rand, 20, 0, 128, chunkCoords, overworldBiomes);
Worlds.generateInBiome(world, new WorldGenMinable(AliensVsPredator.blocks().oreSilicon.getDefaultState(), 4), rand, 15, 0, 64, chunkCoords, overworldBiomes);
Worlds.generateInBiome(world, new WorldGenMinable(AliensVsPredator.blocks().oreLithium.getDefaultState(), 3), rand, 1, 1, 48, chunkCoords, overworldBiomes);
Worlds.generateInBiome(world, new WorldGenMinable(AliensVsPredator.blocks().oreSilicon.getDefaultState(), 1), rand, 15, 0, 64, chunkCoords, overworldBiomes);
Worlds.generateInBiome(world, new WorldGenMinable(AliensVsPredator.blocks().oreMonazite.getDefaultState(), 3), rand, 1, 1, 48, chunkCoords, overworldBiomes);
if (biome == Biomes.BEACH || biome == Biomes.OCEAN || biome == Biomes.DEEP_OCEAN || biome == Biomes.FROZEN_OCEAN || biome == Biomes.FROZEN_RIVER)
{
Worlds.generateInBiome(world, new WorldGenMinable(AliensVsPredator.blocks().oreLithium.getDefaultState(), 6), rand, 1, 1, 48, chunkCoords, overworldBiomes);
}
if (biome == Biomes.JUNGLE || biome == Biomes.JUNGLE_EDGE || biome == Biomes.JUNGLE_HILLS || biome == Biomes.MUTATED_JUNGLE || biome == Biomes.MUTATED_JUNGLE_EDGE)
{
Worlds.generateInBiome(world, new WorldGenMinable(AliensVsPredator.blocks().oreCobalt.getDefaultState(), 6), rand, 1, 1, 64, chunkCoords, overworldBiomes);
}
}
}

0 comments on commit cf1d1e2

Please sign in to comment.