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

Trying to add keybindings to my Snobsidian Mod (1.7.2) following online java tutorial from FORGE websitte http://www.minecraftforge.net/wiki/Key_Binding. Everything seems fine until I try to hook into FMLCommon Handler Bus (  FMLCommonHandler.instance().bus().register(new KeyInputHandler());  )then i get a "instance" error in eclipse.  I think I'm calling it from the right placeright after  @SidedProxy(clientSide = "BCHSnobsidian.common.ClientProxy", serverSide = "BCHSnobsidian.common.CommonProxy")

    public static CommonProxy proxy;    but I could be mistaken.

not sure if client side / Server side is a concern. or if i need to pass a instance argument. I'm new to the community and would like to THANK YOU all in advance for any help

 

https://gist.github.com/LegomanBry/702cab8278b90ba31018

Hi

 

The problem appears to be that you've put your call to the handler outside of any method.  And a lot of your code is in the class constructor but it should be in preInit, postInit.

 

This link might help

http://greyminecraftcoder.blogspot.com.au/2013/11/how-forge-starts-up-your-code.html

 

If you're just new to Java, this thread might be of interest

http://www.minecraftforge.net/forum/index.php/topic,16784.msg84954.html#msg84954

and

http://www.minecraftforge.net/forum/index.php/topic,19694.msg99530.html#msg99530

 

-TGG

  • Author

Thank you very much Ghost for taking the time to review my code and Reply. I'm following the links you provided and am realizing I don't have quite the grasp on Java I thought i did.

I'm rewriting my code to reflect the Basic Framework for forge mods. Then I'm going back a reviewing some things  (Recursive methods, HashMaps etc.) hopefully along the way something will "click" and ill understand why its not working.

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.