Posted March 23, 201411 yr I'm very confused here...I have a custom ore I want to generate, and I was told to run "OreDictionary.registerOre" on the ore to add it to the ore dictionary. However, that still doesn't seem to cause it to spawn? I'm confused on how to set it up to spawn how I want it to spawn (I'd like to add multiple ores with varying spawn rates).
March 24, 201411 yr Author That makes sense. Well, the only world generation tutorial I can find isn't for 1.7...could someone help me with that?
March 24, 201411 yr Author Sweet! Thanks! That fixed all of my problems. Only one more question. Do I have to make a new generation code for every ore? Here's my OreGen code. package radial.Main; import java.util.Random; import net.minecraft.world.gen.feature.WorldGenMinable; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import cpw.mods.fml.common.IWorldGenerator; public class OreGen implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { // TODO Auto-generated method stub switch(world.provider.dimensionId){ case 0 : generateSurface(world, random,chunkX*16,chunkZ*16); } } private void generateSurface(World world, Random random, int BlockX, int BlockZ) { for(int i = 0; i<10;i++){ int Xcoord = BlockX + random.nextInt(16); int Zcoord = BlockZ + random.nextInt(16); int Ycoord = random.nextInt(100); (new WorldGenMinable(mainClass.TestOre, 4)).generate(world, random, Xcoord, Ycoord, Zcoord); }} }
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.