I was wondering what the generation code for an ore was. I technically believe that i already know the correct code, except now i'm confused when i install my mod due to the fact that, when creating a new world, Minecraft freezes and stops responding.
Here's the generation code that i am using:
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i=0; i < 50; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(EndoclyptOre.blockID, 50)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
I've guessed that i may be missing a section of code because i don't see any other reason why this doesn't work.
THANK YOU SINCERELY FOR ANY HELP
I DEEPLY appreciate it, DEEPLY.
Here's the generation code that i am using:
public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
{
for(int i=0; i < 50; i++)
{
int randPosX = chunkX + rand.nextInt(16);
int randPosY = rand.nextInt(64);
int randPosZ = chunkZ + rand.nextInt(16);
(new WorldGenMinable(EndoclyptOre.blockID, 50)).generate(world, rand, randPosX, randPosY, randPosZ);
}
}
I've guessed that i may be missing a section of code because i don't see any other reason why this doesn't work.
THANK YOU SINCERELY FOR ANY HELP
I DEEPLY appreciate it, DEEPLY.
import java.util.Random;
public class mod_ extends BaseModMp
{
//Variables
/*16341*/public static final int blockiron_oreblockid = 342
//Block Defines
/*16341*/public static final Block blockiron_ore = new Blockiron_ore(blockiron_oreblockid, 0)/*16341*/.setHardness(48.32F)/*16341*/.setBlockName("blockiron_ore");/*16341*/
public String Version()
{
return "0.1";
}
public mod_ ()
{
//Block adds
/*16341*/ModLoader.RegisterBlock(blockiron_ore);
//Texture overides
/*16341*/blockiron_ore.blockIndexInTexture = ModLoader.addOverride("terrain.png", "34");
//Block/Item names
/*16341*/ModLoader.AddName(blockiron_ore, "iron ore");
//Crafting
}
}
Hope this helps. But i honestly can't figure it out either :tongue.gif: