Jump to content

End world ore generation


Recommended Posts

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?

Link to comment
Share on other sites

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 {



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, 8)).generate(world, random, Xcoord, Ycoord, Zcoord);




Not in code:

Smily face is supposed to be eight


Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.