i am making a mod to and want to add 5 ores, but if i put the generate code in eclipse i can find only 1 ore in the world. i checked the codes 5 times, made 100 new worlds. can u show me how your generating ore code looks like so i can go back to modding thanks
this is my code what do i wrong?
:public void generateSurface(World world, Random random, int i, int j) { for(int k = 0; k < 5; k++) { int randPosX = i + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = j + random.nextInt(16); (new WorldGenMinable(FlusOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ); } }
public void generateSurface1(here u see that there is a (1) in the line generateSurface(1) does it need to be a 1 or just different?)(World world, Random random, int i, int j) { for(int k = 0; k < 5; k++) { int randPosX = i + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = j + random.nextInt(16); (new WorldGenMinable(MagnetOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ); } }
Hope u can help me:D
im a new coder aswell but i've made a few mods but basically you only need onepublic void, two always screws it up, but just put them all under the same public void so it looks like this:
public void generateSurface(World world, Random random, int i, int j) { for(int k = 0; k < 5; k++) { int randPosX = i + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = j + random.nextInt(16); (new WorldGenMinable(FlusOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ); }
{ for(int k = 0; k < 5; k++) { int randPosX = i + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = j + random.nextInt(16); (new WorldGenMinable(MagnetOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ); } }
0
im a new coder aswell but i've made a few mods but basically you only need onepublic void, two always screws it up, but just put them all under the same public void so it looks like this:
public void generateSurface(World world, Random random, int i, int j)
{
for(int k = 0; k < 5; k++)
{
int randPosX = i + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = j + random.nextInt(16);
(new WorldGenMinable(FlusOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ);
}
{
for(int k = 0; k < 5; k++)
{
int randPosX = i + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = j + random.nextInt(16);
(new WorldGenMinable(MagnetOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
0
0
0
and the error
0
0
1st Jakeflyer
2nd Hugglemaow
3rd Abbac
0
0
0
0
0
0
0
1
1