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

Hey guys.

 

I'm trying to set up my dimensions. When I first wrote the mod a while back, I had just hardcoded IDs - creating my blocks in the main class looked like this:

 

    public final static Block akatoeGrass = new AkatoeGrass(201).setUnlocalizedName("akatoeGrass");

 

With it like that, my biome works just fine.

However, now I want to set up configs for the mod. After I stopped doing this mod (I went on a break from it for a while), I learned about how to make a config file, and so I now do my blocks like this:

    public static Block akatoeGrass;

    @EventHandler
    public void preInit(FMLPreInitializationEvent event) {
    	RemulaConfig.loadConfig(event);
    	RemulaConfig config = new RemulaConfig();

        akatoeGrass = new AkatoeGrass(config.akatoeGrassID).setUnlocalizedName("akatoeGrass");
    }

 

Doing it that way gives me this error, with a NPE. I can't for the life of me figure out why... Can someone shed some light on the situation?

It's probably a really simple error and I'm just missing something, but noone on IRC could help so figured I might as well post here :P

 

http://pastebin.com/BXa5Ae8A

(Line 644 of my Remula class just registers my Biome)

 

Any help is great, sorry if it's a bit of a noobie question but I'm stumped of how I can get configs working without causing an NPE.

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

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.