Difference between revisions of "Talk:How to Write a Client"

From wiki.vg
Jump to navigation Jump to search
(Oops, doubled)
Line 25: Line 25:
  
 
Na, ya know, noob here, can't do anything with that. Life is pain. Help me %MINECRAFT_MASTER%, you're my only hope.
 
Na, ya know, noob here, can't do anything with that. Life is pain. Help me %MINECRAFT_MASTER%, you're my only hope.
 +
 +
--[[User:Hunterbuscus 3rd|Hunterbuscus 3rd]] ([[User talk:Hunterbuscus 3rd|talk]]) 20:20, 28 March 2014 (UTC)
 +
 +
I've had the same problem here too. Whatever I did, the player wouldn't move.
 +
My code was messy, so I rewrote it. Then, it worked fine.
 +
Are you sending the settings packet (0x15) and the plugin message packet (0x17)?
 +
Seems like it might have help in my case.
 +
I'me no expert either (joined like two weeks ago)
 +
But I would recommend creating a proxy to monitor exactly how it is normally done
 +
 +
hope this helps...

Revision as of 20:20, 28 March 2014

Respawning

I have noticed that sending a 0x09 does nothing to make a client respawn. But a 0xCD with payload to 1 does. However, the client may stay invisible from an observer logged on the server... If the observer logs out then logs in, then it can see that the client has respawned.

This is very weird and means that maybe more information needs to be sent to server. (of course, I sent 0x0D regularly while testing all that, and server gave me an 0x0D to spawn (which I respected) and 0x08 Health updates).

--> I (may have) found out what happens : this is (in my sense) a bug from the notchian client : from the dying client, if you stop sending your position packets 0x0D after death and stop all sends except keep-alives, the "dead body" stays visible for a notchian observer. When the dying client respawns, the dead body disappears and never reappears... So the client is invisible from an observer (but blocks are refused in his hitbox by the server, so it seems to exist through the server). If you send 0x0D after being dead (filled up with last position before dying for instance), the body disappears. And if after that you send a 0xCD to respawn, everyhing is ok, the observer can see you.

So if you send 0xCD (respawn) right after dying (without sending 0x0D between time of death and 0xCD), the notchian observer has no time to delete the dead body, and when the observer receives new 0x0D, it thinks it is from a dead body and make it disappear instead of making it respawning.

So the right procedure is given in the article... Thanks for reading.

PlayerPositionAndLook apologize 1.7.x

So... what about apologize handling? We still need to apologize?

With the exact packet or what? Because, you know, Packet Id conflict

Or use client side PlayerPositionAndLook? How to handle HeadY and FeetY? Tried to do something, but still can't move my player.

Na, ya know, noob here, can't do anything with that. Life is pain. Help me %MINECRAFT_MASTER%, you're my only hope.

--Hunterbuscus 3rd (talk) 20:20, 28 March 2014 (UTC)

I've had the same problem here too. Whatever I did, the player wouldn't move. My code was messy, so I rewrote it. Then, it worked fine. Are you sending the settings packet (0x15) and the plugin message packet (0x17)? Seems like it might have help in my case. I'me no expert either (joined like two weeks ago) But I would recommend creating a proxy to monitor exactly how it is normally done

hope this helps...