Jump to content

Recommended Posts

Posted

Hello, I've been trying to make this working for several hours and it's getting frustrating :/ I'm trying to register an event in @Init (tried @PreInit too) method, but it's never firing. I can register the event in load() or the mod constructor, but it only works in the client, if I put the mod on the server, it throws an error.

 

Source code:

 

  Reveal hidden contents

 

 

The "test" message never shows up, and the event isn't registered. If I register it inside the constructor or load(), client works flawlessly, but this error shows up on the server (started it inside Eclipse, but the same error is thrown if I run the server from .jar and put the mod inside mods folder):

 

  Reveal hidden contents

 

 

I have no idea why it's trying to load the NetClientHandler class on the server, just because I'm trying to register an event, can't find any references to that class in my mod, I'm simply clueless. I have the latest Forge version for 1.5.1 (just to be 100% sure, I redownloaded it about 30 minutes ago). Thanks for help :)

Posted
  Quote
public class mod_HeavyAnvils extends BaseMod

 

seriously?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

  Quote

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted
  On 4/12/2013 at 5:03 PM, SanAndreasP said:

  Quote
public class mod_HeavyAnvils extends BaseMod

 

seriously?

 

Oops, somehow I automatically assumed it was supposed to work like that, didn't realize it's just for ModLoader compatibility... Explains many weird things I've encountered, anyways it works now, thanks a lot :)

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.