To see something on the screen make sure you send the map region followed by the first player updating packet.
my code.
Code:
/**
* Sends the map region to the client.
*/
public void sendMapRegion() {
outBuffer.createFrame(73);
outBuffer.writeWordA(3500 >> 3);
outBuffer.putShort(3500 >> 3);
flushOutBuffer();
}
/**
* Updates the client, sends appearance, other players around, position,
* etc.
*/
private void updatePlayer() {
// players initialization
outBuffer.createFrame(81);
// placeholder for packet size.
outBuffer.putShort(0);
int ofs = outBuffer.position;
outBuffer.initializeBitAccess();
// update this player
// 1 for updating player, 0 for not.
outBuffer.writeBits(1, 1);
// update type. 0 - 3.
outBuffer.writeBits(2, 3);
// height.
outBuffer.writeBits(2, 0);
// discard walking queue. (after teleporting etc.)
outBuffer.writeBits(1, 0);
// ??
outBuffer.writeBits(1, 1);
// 'local' y.
outBuffer.writeBits(7, 0x29);
// 'local' x.
outBuffer.writeBits(7, 50);
// amount of other players to update.
outBuffer.writeBits(8, 0);
// ??
outBuffer.writeBits(11, 2047);
outBuffer.finishBitAccess();
outBuffer.put(0);
outBuffer.writeFrameSizeWord(outBuffer.position - ofs);
// write after each packet.
flushOutBuffer();
}