Jump to content

A world gen eclipse error


Salinor

Recommended Posts

So I've been following quite a few tutorials for how things hook up together. I have the mod foundation in place, the ores setup, etc. I want to get it to do the ore generation so I created that class.

 

The following line gives an eclipse error, saying that the blockID saying "It can not make a static reference to a non-static field."

 

I have checked 3 different tutorials and how to's and they all list doing the ore generation this way. I've compared my ore classes to the same 3 and beyond minor differences of overriding step sounds etc... it seems to match up. So I'm a bit puzzled... I think I've been eye balling this to long... so if anyone has a suggestion or thought... that would be good. Eclipse is suggesting I modify the base block class but that would be a bad idea IMHO :) That and I don't actually think it will fix the problem.

 

 

The line the eclipse doesn't like:

(new WorldGenMinable(triad.common.AluminumOre.blockID, 10)).generate(world,random, Xcoord, Ycoord, Zcoord);

 

Thanks for any assistance I'm going to continue poking at it as is my nature to figure out what may be different in how I implemented this from the examples. Blowing off years of rust on my Java programming skills as been interesting to say the least :)

Link to comment
Share on other sites

Thanks for the response and I was about to do that. However, I figured out my problem. I was incorrectly pointing to the wrong object... and I mistakenly thought it was looking for a reference within the package... and not the actual base mod class itself. 

 

I needed to do the following instead: (new WorldGenMinable(Triad.aluminumOre.blockID, 10)).generate(world,random, Xcoord, Ycoord, Zcoord);

 

Thanks for responding though!

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.

Announcements



×
×
  • Create New...

Important Information

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