Posted July 17, 201411 yr Hello all! I recently picked up this whole modding thing a day or two ago and already have a mod which, I think, is good for that amount of time. My only problem is ore generation. I've read most of the available tutorials on it, and have built a generator. But here's the problem: when I run the mod in Eclipse, I can go down to the level I set spawning at and find some of my ore relatively quickly, but once I've packaged it up and put it in the mods folder for Minecraft, I get a load of nothing. I originally though it must have been because I set the ore to spawn at an absurdly low rate, but 20 minutes later still proved nothing. Maybe its just my own incompetence but I think somethings up here. I included the snippet of my main file where I set the generator, and I included the generator itself. Any help would be greatly appreciated! The generator: package ryan.ryansmod; import java.util.Random; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.World; import cpw.mods.fml.common.IWorldGenerator; public class RyansGenerator 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 generateEnd(World world, Random random, int i, int j) {} private void generateSurface(World world, Random random, int i, int j) { for(int k = 0; k < 10; k++) { int AleniumOreXCoord = i + random.nextInt(16); //remember +i int AleniumOreYCoord = random.nextInt(14); int AleniumOreZCoord = j + random.nextInt(16); //remember +j new WorldGenMinable(Ryansmod.AleniumOreBlock, 10).generate(world, random, AleniumOreXCoord, AleniumOreYCoord, AleniumOreZCoord); } } private void generateNether(World world, Random random, int i, int j) {} } And the snippet of where I call the generator into action (Inside the base mod class of course): @EventHandler public void load(FMLInitializationEvent event) { GameRegistry.registerWorldGenerator(new RyansGenerator(), 0); proxy.registerRenderers(); }
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.