Jump to content

Recommended Posts

Posted

Hi! I've been trying to do some simple modding, but I've run into a wall trying to get a keybind to work. My mod displays the player's coordinates on screen, and the idea is to add a keybind that will change the display location of the coordinates. However, I can't get anything (not even a print statement) to happen on key input.

 

Here's my KeyInputHandler class:

 

  Reveal hidden contents

 

 

Here's the ClientProxy:

 

  Reveal hidden contents

 

 

Here's the main mod file:

 

  Reveal hidden contents

 

 

Sorry for the large amount of commented out code, I've tried a lot of things to get this working.

 

Any idea what I'm doing wrong?

Posted

Did you check if the keybinding appears in minecraft's controls gui?

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Yes.

 

However, I managed to figure out my problems. The real problem was that I had my KeyInputHandler.java file outside of the client package. I've also made a number of other changes to get descriptions, saved settings, etc. working. Here's my fixed code:

 

 

KeyInputHandler.java

 

  Reveal hidden contents

 

 

ClientProxy.java

 

 

  Reveal hidden contents

 

 

en_US.lang

 

 

  Reveal hidden contents

 

 

The main mod file was not changed beyond altering the starting coordinate position.

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.

Announcements



×
×
  • Create New...

Important Information

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