Code format :(

This commit is contained in:
md_5
2014-01-03 19:52:35 +11:00
parent 9f8c04ef86
commit 80caa2b669
18 changed files with 249 additions and 193 deletions

View File

@@ -33,63 +33,66 @@ public enum Protocol
// Undef
HANDSHAKE
{
{
TO_SERVER.registerPacket( 0x00, Handshake.class );
}
},
{
{
TO_SERVER.registerPacket( 0x00, Handshake.class );
}
},
// 0
GAME
{
{
TO_CLIENT.registerPacket( 0x00, KeepAlive.class );
TO_CLIENT.registerPacket( 0x01, Login.class );
TO_CLIENT.registerPacket( 0x02, Chat.class );
TO_CLIENT.registerPacket( 0x07, Respawn.class );
TO_CLIENT.registerPacket( 0x38, PlayerListItem.class );
TO_CLIENT.registerPacket( 0x3A, TabCompleteResponse.class );
TO_CLIENT.registerPacket( 0x3B, ScoreboardObjective.class );
TO_CLIENT.registerPacket( 0x3C, ScoreboardScore.class );
TO_CLIENT.registerPacket( 0x3D, ScoreboardDisplay.class );
TO_CLIENT.registerPacket( 0x3E, Team.class );
TO_CLIENT.registerPacket( 0x3F, PluginMessage.class );
TO_CLIENT.registerPacket( 0x40, Kick.class );
{
{
TO_CLIENT.registerPacket( 0x00, KeepAlive.class );
TO_CLIENT.registerPacket( 0x01, Login.class );
TO_CLIENT.registerPacket( 0x02, Chat.class );
TO_CLIENT.registerPacket( 0x07, Respawn.class );
TO_CLIENT.registerPacket( 0x38, PlayerListItem.class );
TO_CLIENT.registerPacket( 0x3A, TabCompleteResponse.class );
TO_CLIENT.registerPacket( 0x3B, ScoreboardObjective.class );
TO_CLIENT.registerPacket( 0x3C, ScoreboardScore.class );
TO_CLIENT.registerPacket( 0x3D, ScoreboardDisplay.class );
TO_CLIENT.registerPacket( 0x3E, Team.class );
TO_CLIENT.registerPacket( 0x3F, PluginMessage.class );
TO_CLIENT.registerPacket( 0x40, Kick.class );
TO_SERVER.registerPacket( 0x00, KeepAlive.class );
TO_SERVER.registerPacket( 0x01, Chat.class );
TO_SERVER.registerPacket( 0x14, TabCompleteRequest.class );
TO_SERVER.registerPacket( 0x15, ClientSettings.class );
TO_SERVER.registerPacket( 0x17, PluginMessage.class );
}
},
TO_SERVER.registerPacket( 0x00, KeepAlive.class );
TO_SERVER.registerPacket( 0x01, Chat.class );
TO_SERVER.registerPacket( 0x14, TabCompleteRequest.class );
TO_SERVER.registerPacket( 0x15, ClientSettings.class );
TO_SERVER.registerPacket( 0x17, PluginMessage.class );
}
},
// 1
STATUS
{
{
TO_CLIENT.registerPacket( 0x00, StatusResponse.class );
TO_CLIENT.registerPacket( 0x01, PingPacket.class );
{
TO_SERVER.registerPacket( 0x00, StatusRequest.class );
TO_SERVER.registerPacket( 0x01, PingPacket.class );
}
},
{
TO_CLIENT.registerPacket( 0x00, StatusResponse.class );
TO_CLIENT.registerPacket( 0x01, PingPacket.class );
TO_SERVER.registerPacket( 0x00, StatusRequest.class );
TO_SERVER.registerPacket( 0x01, PingPacket.class );
}
},
//2
LOGIN
{
{
TO_CLIENT.registerPacket( 0x00, Kick.class );
TO_CLIENT.registerPacket( 0x01, EncryptionRequest.class );
TO_CLIENT.registerPacket( 0x02, LoginSuccess.class );
{
TO_SERVER.registerPacket( 0x00, LoginRequest.class );
TO_SERVER.registerPacket( 0x01, EncryptionResponse.class );
}
};
{
TO_CLIENT.registerPacket( 0x00, Kick.class );
TO_CLIENT.registerPacket( 0x01, EncryptionRequest.class );
TO_CLIENT.registerPacket( 0x02, LoginSuccess.class );
TO_SERVER.registerPacket( 0x00, LoginRequest.class );
TO_SERVER.registerPacket( 0x01, EncryptionResponse.class );
}
};
/*========================================================================*/
public static final int MAX_PACKET_ID = 0xFF;
public static final int PROTOCOL_VERSION = 0x04;