Jump to content

Need ore generation help


MonsterCreeper

Recommended Posts

I've run into a problem when writing my first mod.

I'm trying to get my ore to generate but no matter what I try it won't show in the world.

This is the code I'm using to generate my ore in the world (everything in my mod_ file seems to be set up fine)

 

    public void GenerateSurface(World world, Random rand, int chunkX, int chunkZ)
    {
	for(int L = 0; L < 5; L++)
	{
		int i1 = chunkX + rand.nextInt(16);
		int j1 = rand.nextInt(20);
		int k1 = chunkZ + rand.nextInt(16);
		new WorldGenMinable(voidOre.blockID, 4).generate(world, rand, i1, j1, k1);
            
	}
    }

 

any advice??

 

Link to comment
Share on other sites

it wasn't copy and paste. I've used java before this for other stuff, I'm rather new to modding though and I don't know the minecraft forge/modloader api very well yet as it's only my first day of using forge. This was done following a tutorial on youtube. Please find evidence before you make such accusations.

Link to comment
Share on other sites

i dont know about you guys, but when is capitalising the first letter of methods ever done in programming? i thought it was more of an organisational rule similar to using indenting which is one of the very first things you learn when learning any programming language?

Link to comment
Share on other sites

i dont know about you guys, but when is capitalising the first letter of methods ever done in programming? i thought it was more of an organisational rule similar to using indenting which is one of the very first things you learn when learning any programming language?

 

does it matter if what i did follows convention, I think you will find that starting your mod_XXX class with a lower case m is against the normal java naming convention. This was following a tutorial for something I didn't know much about, by someone I would expect to have more experience than me when it comes to modding, so it is unlikely I would question a simple break of convention.

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.

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.

×
×
  • Create New...

Important Information

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