Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 :)

  • 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.

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

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.