3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-10-08 11:10:06 +02:00

Fix resetReader being wrong, ty @Matsv for helping solve this

Dieser Commit ist enthalten in:
Myles 2016-07-02 22:05:08 +01:00
Ursprung 8edb7048a1
Commit 212da9c46c
2 geänderte Dateien mit 4 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -394,6 +394,10 @@ public class PacketWrapper {
* Reset the reader, so that it can be read again. * Reset the reader, so that it can be read again.
*/ */
public void resetReader() { public void resetReader() {
// Move readable objects are packet values
this.packetValues.addAll(readableObjects);
this.readableObjects.clear();
// Move all packet values to the readable for next packet.
this.readableObjects.addAll(packetValues); this.readableObjects.addAll(packetValues);
this.packetValues.clear(); this.packetValues.clear();
} }

Datei anzeigen

@ -116,7 +116,6 @@ public class Protocol1_9_3TO1_9_1_2 extends Protocol {
ClientWorld clientChunks = wrapper.user().get(ClientWorld.class); ClientWorld clientChunks = wrapper.user().get(ClientWorld.class);
int dimensionId = wrapper.get(Type.INT, 1); int dimensionId = wrapper.get(Type.INT, 1);
clientChunks.setEnvironment(dimensionId); clientChunks.setEnvironment(dimensionId);
wrapper.passthroughAll(); // Todo: Fix this
} }
}); });
} }
@ -133,7 +132,6 @@ public class Protocol1_9_3TO1_9_1_2 extends Protocol {
ClientWorld clientWorld = wrapper.user().get(ClientWorld.class); ClientWorld clientWorld = wrapper.user().get(ClientWorld.class);
int dimensionId = wrapper.get(Type.INT, 0); int dimensionId = wrapper.get(Type.INT, 0);
clientWorld.setEnvironment(dimensionId); clientWorld.setEnvironment(dimensionId);
wrapper.passthroughAll(); // Todo: Fix this
} }
}); });
} }