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

I'm using IMessage and SimpleNetworkWrapper to sync things between client and server right now, whenever I try to run a dedicated server it crashes between PreInitialisation and Initialisation, because it tries to load EntityClientPlayerMP on the server side.

 

 

Registering the message (this is the cause of the exception):

NETWORK.registerMessage(MessageSyncEPP.Response.Handler.class, MessageSyncEPP.Response.class, 1, Side.CLIENT);

 

The offending line (if I remove this line, it works fine):

ExtendedPlayer properties = ExtendedPlayer.get(Minecraft.getMinecraft().thePlayer);

 

The offending line is in my onMessage method of my Response.Handler class.

 

From my understanding, registerMessage takes a handler, the packet it handles, an id, and the side it should be handled on.

 

I know Minecraft.getMinecraft().thePlayer is Client only, but shouldn't the onMessage only be called on the client side (since I used Side.CLIENT as the last parameter in registerMessage)? On top of that, why is the onMessage being called in the preinitialisation stage, and why isn't it appearing in the stack trace?

BEFORE ASKING FOR HELP READ THE EAQ!

 

I'll help if I can. Apologies if I do something obviously stupid. :D

 

If you don't know basic Java yet, go and follow these tutorials.

Guest
This topic is now closed to further replies.

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.