ItsTheRuski Posted October 19, 2013 Posted October 19, 2013 I have followed a tutorial and got my ores to generate in the regular Minecraft world, but I can't get it to generate in the Nether or the end. I already tried setting the values to get huge veins, and again, there are huge veins in the overworld but not a single ore in the Nether or the End. I have registered all the ores, and they are accessible through the Creative menu. Here is my custom generation class that implements IWorldGenerator: package eclipse.MoreApples.worldgen; import java.util.Random; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; import eclipse.MoreApples.common.MoreApples; public class AppleIronIngotWorldGeneration implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { switch(world.provider.dimensionId){ case -1: generateNether(world, random, chunkX * 16, chunkZ * 16); break; case 0: generateSurface(world, random, chunkX * 16, chunkZ * 16); break; case 1: generateEnd(world, random, chunkX * 16, chunkZ * 16); break; } } private void generateSurface(World world, Random random, int i, int j) { for(int k = 0; k < 10; k++){ int chunkX = i + random.nextInt(16); int chunkY = random.nextInt(256); int chunkZ = j + random.nextInt(16); (new WorldGenMinable(MoreApples.appleIron_ore.blockID, 64)).generate(world, random, chunkX, chunkY, chunkZ); } int randomGemGeneration = (int) (Math.random() * 4 +1); for(int k = 0; k <randomGemGeneration ; k++){ int chunkX = i + random.nextInt(16); int chunkY = random.nextInt(256); int chunkZ = j + random.nextInt(16); (new WorldGenMinable(MoreApples.appleGem_ore.blockID, 64)).generate(world, random, chunkX, chunkY, chunkZ); } } private void generateEnd(World world, Random random, int i, int j) { for(int k = 0; k < 10; k++){ int chunkX = i + random.nextInt(16); int chunkY = random.nextInt(256); int chunkZ = j + random.nextInt(16); (new WorldGenMinable(MoreApples.appleEnder_ore.blockID, 64)).generate(world, random, chunkX, chunkY, chunkZ); } } private void generateNether(World world, Random random, int i, int j) { for(int k = 0; k < 15; k++){ int chunkX = i + random.nextInt(16); int chunkY = random.nextInt(256); int chunkZ = j + random.nextInt(16); (new WorldGenMinable(MoreApples.appleFlame_ore.blockID, 64)).generate(world, random, chunkX, chunkY, chunkZ); } } } Does anyone know what I did wrong? Thanks for reading! =) Quote
coolAlias Posted October 19, 2013 Posted October 19, 2013 That's because you are using WorldGenMinable without specifying what type of block to replace. There is a three-parameter version of the constructor, the 3rd parameter of which is the block to replace; without that, it defaults to the stone block, of which there is none in the Nether. No blocks to replace = no custom blocks. Quote http://i.imgur.com/NdrFdld.png[/img]
ItsTheRuski Posted October 19, 2013 Author Posted October 19, 2013 Right! I completely forgot about that. Thanks a bunch, that solved it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.