Multiple Ore Generation Problem 1.7.2

Recommended Posts

Could some one help me i trying to get more than one ore spawn in my custom dimension I have followed a tutorial on multiple ore generation (new to modding) but it does not generate right http://oi60.tinypic.com/x22jjp.jpg ignore all the random block just testing things ^^ but as you can see in the picture it spawning them all together and in the same veins of ore. can any one help me fix this please

Code

```private void generateTestDimension(World world, Random random, int chunkX, int chunkZ)
{
for(int i = 0; i < 20; i++) //8 is rarity
{
int xCoord = chunkX + random.nextInt(16);
int yCoord = random.nextInt(256);
int zCoord = chunkZ + random.nextInt(16);

(new TvWorldGenMinable(Blocks.obsidian, 15)).generate(world, random, xCoord, yCoord, zCoord);
(new TvWorldGenMinable(Blocks.redstone_block, 15)).generate(world, random, xCoord, yCoord, zCoord);
(new TvWorldGenMinable(Blocks.emerald_block, 15)).generate(world, random, xCoord, yCoord, zCoord);
(new TvWorldGenMinable(Blocks.brick_block, 15)).generate(world, random, xCoord, yCoord, zCoord);
(new TvWorldGenMinable(Blocks.stonebrick, 15)).generate(world, random, xCoord, yCoord, zCoord);

}```

also I have tried copying and pasting the whole loop and changing the xCoord yCoord zCoord to  xCoord1 yCoord1 zCoord1 and so on but it stops generating any chunks.

Thanks

Share on other sites

Hey, I remember being in the same place you are! except I didn't have my own dimension. I'm sure you can figure out how to convert this to work in your own dimension though.

This is the code I used:

```package 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;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import ryansmod.common.block.AleniumOre;
import ryansmod.RyansMod;

public class Generator implements IWorldGenerator {
public static Block AleniumOreGen = new ryansmod.common.block.AleniumOre();
@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) {
// Just copy the stuff below to spawn multiple kinds of ores. I hope its not to hard for you to read!
//Number of clusters of the ore in question spawned
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
//WordlGenMinable([block], [Number of block per cluster(?)])
(new WorldGenMinable(RyansMod.aleniumOre, 5)).generate(world, random, AleniumOreXCoord, AleniumOreYCoord, AleniumOreZCoord);
}
}

private void generateNether(World world, Random random, int i, int j) {}
}
```

And then in my main file I had it registered with:

```    @EventHandler
GameRegistry.registerWorldGenerator(new Generator(), 0);
proxy.registerRenderers();
}
```

Hope this helps! Good luck on your mod!

Share on other sites

Hey, I remember being in the same place you are! except I didn't have my own dimension. I'm sure you can figure out how to convert this to work in your own dimension though.

This is the code I used:

```package 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;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import ryansmod.common.block.AleniumOre;
import ryansmod.RyansMod;

public class Generator implements IWorldGenerator {
public static Block AleniumOreGen = new ryansmod.common.block.AleniumOre();
@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) {
// Just copy the stuff below to spawn multiple kinds of ores. I hope its not to hard for you to read!
//Number of clusters of the ore in question spawned
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
//WordlGenMinable([block], [Number of block per cluster(?)])
(new WorldGenMinable(RyansMod.aleniumOre, 5)).generate(world, random, AleniumOreXCoord, AleniumOreYCoord, AleniumOreZCoord);
}
}

private void generateNether(World world, Random random, int i, int j) {}
}
```

And then in my main file I had it registered with:

```    @EventHandler
GameRegistry.registerWorldGenerator(new Generator(), 0);
proxy.registerRenderers();
}
```

Hope this helps! Good luck on your mod!

Wow thanks that seems to have done the trick there all split up now and are spawning underground as well now

thanks again ill post back if I run into some problem with it but from what i can see it all working

Share on other sites

Sure! I ask lots of questions and am always glad to help someone else. Glad it worked.

Share on other sites

Sure! I ask lots of questions and am always glad to help someone else. Glad it worked.

Do you no how I would go about make filler blocks and the top layer spawn. apart from the ores i got to spawn in the world its all diamond blocks and i tried a few things but i can not see to find out how to do it.

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.

×   Pasted as rich text.   Restore formatting

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

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

• Posts

• I got this warning when loading in and none of my textures work for my items. (They were working until I added recipes to them): [19:46:37] [Worker-Main-1/WARN] [minecraft/ModelBakery]: Exception loading blockstate definition: 'testmod:blockstates/raw_sapphire_block.json' missing model for variant: 'testmod:raw_sapphire_block#' [19:46:37] [Worker-Main-1/WARN] [minecraft/ModelBakery]: Unable to load model: 'testmod:sapphire#inventory' referenced from: testmod:sapphire#inventory: java.io.FileNotFoundException: testmod:models/item/sapphire.json [19:46:37] [Worker-Main-1/WARN] [minecraft/ModelBakery]: Unable to load model: 'testmod:raw_sapphire#inventory' referenced from: testmod:raw_sapphire#inventory: java.io.FileNotFoundException: testmod:models/item/raw_sapphire.json [19:46:38] [Worker-Main-1/WARN] [minecraft/ModelManager]: Missing textures in model testmod:metal_detector#inventory:     minecraft:textures/atlas/blocks.png:testmod:item/metal_detector   What does this mean and how do I fix it?
• Hi guys. my modpack isnt running great. its quite a big modpack, and i have 22gb of DDR5 ram allocated, its using about 50%, so its not capping at performance. Does anyone know why this is happening? Modlist: https://pastebin.com/s2VzSXjP video of freezing: https://streamable.com/xt6wd2
• That log still has both embeddium and rubidium Also not sure if "reforgium" would count as a dupe of those mods as well.

• Who's Online (See full list)

×

• Activity

×
• Create New...