Jump to content

[SOLVED]Mod dosen't work on server ? Packet recieving and sending?


Recommended Posts

Posted

Your message is being sent to the server, so you need to register it with Side.SERVER, not Side.CLIENT.

 

You put the movement code (and also the stack-damaging code) in the message handler's onMessage method, but I suggest you also keep your code that updates the client-side player motion - it will make the controls more responsive feeling.

Posted

BTW - Thanks for not just giving up on me, it's much appreciated! :D

 

Ok, I'm very very very close :D!

 

EDIT: The server crashes even though I've done all the messages :'( It says:

 

If you can please could you post the code I need to do because these messages are so confusing....

 

 

  Reveal hidden contents

 

 

My proxy code and jetpack code:

 

 

  Reveal hidden contents

 

 

Proxy:

 

  Reveal hidden contents

 

 

Please can you help because I've setup messages and it's not working :(

 

THE CLIENT DOSENT CRASH.

 

But when you said the update code, what code do you mean?

 

 

Posted

I really don't get this...  ???

 

New code:

 

Crashes... I think it's because it's returning null but I did a null != check. So I'm not sure... Plus even if I fix this event I think it will still bug out because Im using minecraft.getMinecraft... How do I fix this! Thanks in advance!

 

This is my jetpack event code: (I did register it with that fmlcommonhandler.register.bus thingy)

 

 

  Reveal hidden contents

 

 

Crash report:

 

 

  Reveal hidden contents

 

 

 

Posted

OK, I've got it sending a message, thanks guys! But... Unfortunately I can't make the players motion change...

 

I've done sendToServer(bla bla) NOT sendTo(bla bla)

 

However, it's the onMessage that answers it, not the on server message, therefore I don't have a player parameter and can't make the player move... This is the handler:

 

 

  Reveal hidden contents

 

 

The message:

 

 

  Reveal hidden contents

 

 

And the jetpack event just does mainregistry.network.sendToServer(new JetpackMessage(1)).

 

So, how do I make it move the player.. Thanks in advance :)

 

Posted

Well...in

onMessage

you're not doing anything to make the player move.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Okay, but It dosen't do anything to the player... (But it is getting the correct player as I tested it with give experience)

 

My code on jetpack handler:

 

 

  Reveal hidden contents

Thanks! 

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.