Jump to content

Recommended Posts

Posted

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??

 

Posted

another copy-paster no programming knowledge modder i see. iv been here around a week, and im now starting to get irritated by the insane amount of these people. i have no clue how the mods can deal with it 0.o

Posted

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.

Posted

Yes, please do. The g shouldn't be capital, i screwed this up as well.

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Posted

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?

Posted

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.

Posted

And just illustrated why tutorials of that kind are bad ;)

Some can be good, but I just use them to guide me.

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

Posted

Well, yeah. Some tutorials are really good reference guides, and others are absolute *censored*.

So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.

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.