Posted January 15, 201312 yr I need help to get ores to generate in the End because I can not figure it out
January 15, 201312 yr there should be world.getId or something to check if it is end The Korecraft Mod
January 15, 201312 yr Author I ment as a sample of the code for it because I know the id numbers and the normal gen code that works in Surface but wen I change Surface to End and id: 0 to id: 1 it does not work unless in tearing the entire End apart I missed my ore which is more common then coal is. So can some one give me some world gen code that works in the End?
January 16, 201312 yr Author Main class code for world gen: GameRegistry.registerWorldGenerator(new WorldGeneratorEndless()); World gen class: package endless.common; 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; public class WorldGeneratorEndless 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); case 0: generateSurface(world, random, chunkX * 16, chunkZ * 16); case 1: generateEnd(world, random, chunkX * 16, chunkZ * 16); } } private void generateNether(World world, Random random, int blockX, int blockZ) { } private void generateSurface(World world, Random random, int blockX, int blockZ) { } public int i; public int Xcoord; public int Ycoord; public int Zcoord; private void generateEnd(World world, Random random, int blockX, int blockZ) { for (int i = 0; i < 8; i++) { int Xcoord = blockX + random.nextInt(16); int Ycoord = random.nextInt(56); int Zcoord = blockZ + random.nextInt(16); (new WorldGenMinable(Endless.AncientOre.blockID, ).generate(world, random, Xcoord, Ycoord, Zcoord); } } } Not in code: Smily face is supposed to be eight
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.