Jump to content

[1.8] Accessing GameSettings in development works, but doesn't work when built


UndoRedo

Recommended Posts

Hello everyone.

 

I'm having a really strange issue at the moment. I'm currently using 1.8-Forge11.14.0.1299 (1.8 Recommended). I have the client installed and I have the source package to develop mods. Now for a mod I'm currently working on, I have to access the "gameSettings" field in the Minecraft class. It works fine in the development environment, but as soon as I compile/build the mod and put it into my mods folder in my client installation the game crashes. The log indicates that the gameSettings field in the Minecraft class is not existant.

 

Problem is that this doesn't make any sense at all. The source package and the client installation are both the same version. It works fine in the development environment, but fails when its expected to work. Those are the lines which appear to be "wrong":

 

Minecraft mc = FMLClientHandler.instance().getClient();
KeyBinding[] internalKeybindings = mc.gameSettings.keyBindings;
KeyBinding targetKeybinding = mc.gameSettings.keyBindScreenshot;

 

If further information is needed then tell me and I'll add it as soon as possible.

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.



×
×
  • Create New...

Important Information

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