Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Bots updated to protocol 23

  • Loading branch information...
commit ce3236d013b28aee2dfcce19459ee033329d1daa 1 parent ba5af66
Chris authored January 13, 2012

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  src/simpleserver/bot/Bot.java
6  src/simpleserver/bot/Bot.java
@@ -38,7 +38,7 @@
38 38
 import simpleserver.Server;
39 39
 
40 40
 public class Bot {
41  
-  private static final int VERSION = 22;
  41
+  private static final int VERSION = 23;
42 42
 
43 43
   protected String name;
44 44
   protected Server server;
@@ -119,6 +119,7 @@ protected void login() throws IOException {
119 119
     out.writeInt(VERSION);
120 120
     write(name);
121 121
     out.writeLong(0);
  122
+    write("");
122 123
     out.writeInt(0);
123 124
     out.writeByte(0);
124 125
     out.writeByte(0);
@@ -134,6 +135,7 @@ private void respawn() throws IOException {
134 135
     out.writeByte(0);
135 136
     out.writeShort(128);
136 137
     out.writeLong(0);
  138
+    write("DEFAULT"); // Assuming that if seed is always 0, this can be ignored
137 139
     writeLock.unlock();
138 140
   }
139 141
 
@@ -177,6 +179,7 @@ protected void handlePacket(byte packetId) throws IOException {
177 179
         in.readInt();
178 180
         readUTF16();
179 181
         in.readLong();
  182
+        readUTF16();
180 183
         in.readInt();
181 184
         position.dimension = Dimension.get(in.readByte());
182 185
         in.readByte();
@@ -257,6 +260,7 @@ protected void handlePacket(byte packetId) throws IOException {
257 260
         in.readByte();
258 261
         in.readShort();
259 262
         in.readLong();
  263
+        readUTF16();
260 264
         break;
261 265
       case 0x0a: // Player
262 266
         in.readByte();

0 notes on commit ce3236d

Please sign in to comment.
Something went wrong with that request. Please try again.