Advertisement
Guest User

Untitled

a guest
Jul 16th, 2013
875
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.47 KB | None | 0 0
  1. Custom Client Protocol:
  2.  
  3. When the OpenClassic Client connects, it sends the client's OpenClassic protocol version in the unused OP field in the identification packet (0). When the server receives this packet, it checks for a matching version, and responds with packet 16, a packet 25 for each plugin installed on the server, and packets for all the custom blocks registered to the server. When the client recieves the packet 16, it sends it's own packet 16 to the server along with it's own set of packet 25s.
  4.  
  5. PACKET SPECIFICATION:
  6.  
  7. Packet 16 (Game Info):
  8.  
  9. String - Game Version
  10. String - Language
  11.  
  12. Sent by the server when the client's identification packet (0) has the unused OP variable in use and matching the server's OpenClassic protocol version. Sent by the client when receiving this packet.
  13.  
  14.  
  15.  
  16. Packet 17 (Custom Block):
  17.  
  18. Byte - Block ID.
  19. Byte - Whether the block is opaque (0 or 1)
  20. Byte - Whether the block is selectable in the block menu (0 or 1)
  21. String - Name of the StepSound to use.
  22. Byte - Whether the block is a liquid (0 or 1)
  23. Integer - The delay between each tick on the block
  24. Byte - The ID of the block's fallback (sent to vanilla clients, needed for completion)
  25. Byte - Whether the block prevents adjacent blocks from rendering (0 or 1)
  26. Byte - Whether blocks can be placed in this block.
  27. Byte - Whether this block is a gas (such as air)
  28. Byte - Whether this block prevents adjacent blocks of its type from rendering (example: glass rendering behavior)
  29.  
  30. Sent by the server after sending packet 16.
  31.  
  32.  
  33.  
  34. Packet 18 (Block Model):
  35.  
  36. Byte - Block ID
  37. String - Model Type (TransparentModel, CuboidModel, CubeModel, or Model)
  38. Float - First point X of the collision box.
  39. Float - Second point X of the collision box.
  40. Float - First point Y of the collision box.
  41. Float - Second point Y of the collision box.
  42. Float - First point Z of the collision box.
  43. Float - Second point Z of the collision box.
  44. Float - First point X of the selection box.
  45. Float - Second point X of the selection box.
  46. Float - First point Y of the selection box.
  47. Float - Second point Y of the selection box.
  48. Float - First point Z of the selection box.
  49. Float - Second point Z of the selection box.
  50.  
  51. Sent by the server with a packet 17.
  52.  
  53.  
  54.  
  55. Packet 19 (Quad):
  56.  
  57. Byte - Block ID
  58. Integer - Quad ID
  59. Float - X of the first vertex
  60. Float - Y of the first vertex
  61. Float - Z of the first vertex
  62. Float - X of the second vertex
  63. Float - Y of the second vertex
  64. Float - Z of the second vertex
  65. Float - X of the third vertex
  66. Float - Y of the third vertex
  67. Float - Z of the third vertex
  68. Float - X of the fourth vertex
  69. Float - Y of the fourth vertex
  70. Float - Z of the fourth vertex
  71. String - Texture file of the quad.
  72. Byte - Whether the texture file is in the client jar (0 or 1)
  73. Integer - Width of the texture.
  74. Integer - Height of the texture.
  75. Integer - Width of each subtexture in the texture.
  76. Integer - Height of each subtexture in the texture.
  77. Integer - ID of the subtexture to use.
  78.  
  79. Sent by the server with a packet 18.
  80.  
  81.  
  82.  
  83. Packet 20 (Key Change):
  84.  
  85. Integer - ID of the key.
  86. Byte - Whether the key is pressed (0 or 1)
  87.  
  88. Sent by the client when a key is pressed/released.
  89.  
  90.  
  91.  
  92. Packet 21 (Level Color):
  93.  
  94. String - Variable to change (sky, fog, or cloud)
  95. Integer - New color
  96.  
  97. Sent by the server to change a client's level environment.
  98.  
  99.  
  100.  
  101. Packet 22 (Audio Register):
  102.  
  103. String - Identifier of the audio to be registered.
  104. String - URL of the audio file.
  105. Byte - Whether the audio file is included with the client (0 or 1)
  106. Byte - Whether the audio is music (0 or 1)
  107.  
  108. Sent by the server to register audio.
  109.  
  110.  
  111.  
  112. Packet 23 (Audio Play):
  113.  
  114. String - Identifier of the audio.
  115. Float - X to play at (sound only)
  116. Float - Y to play at (sound only)
  117. Float - Z to play at (sound only)
  118. Float - Volume to play at (sound only)
  119. Float - Pitch to play at (sound only)
  120. Byte - Whether the audio is music (0 or 1)
  121. Byte - Whether the audio is looping (0 or 1) (music only)
  122.  
  123. Sent by the server to play audio.
  124.  
  125.  
  126.  
  127. Packet 24 (Music Stop):
  128.  
  129. String - Identifier of the music to be stopped (all_music for all music)
  130.  
  131. Sent by the server to stop music.
  132.  
  133.  
  134.  
  135. Packet 25 (Plugin):
  136.  
  137. String - Plugin's name
  138. String - Plugin's version.
  139.  
  140. Sent by the client after recieving packet 16, one for each plugin. Sent by the server after sending packet 16, one for each plugin.
  141.  
  142.  
  143.  
  144. Packet 26 (Custom):
  145.  
  146. String - Identifier of the message.
  147. Byte[] - Data contained in the message.
  148.  
  149. Sent by the client/server with custom data (usually by plugin/extension).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement