Posted September 30, 201212 yr 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
September 30, 201212 yr Could you post both the code for the ores and the entire code for the generation?
September 30, 201212 yr Author 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!
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.