Jump to content

[1.6.4] Ore Generation in the Nether and the End [Solved]


Recommended Posts

Posted

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! =)

 

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.

Guest
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.

Announcements



×
×
  • Create New...

Important Information

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