Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 00:22:51 +01:00
Fix resetReader being wrong, ty @Matsv for helping solve this
Dieser Commit ist enthalten in:
Ursprung
8edb7048a1
Commit
212da9c46c
@ -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();
|
||||||
}
|
}
|
||||||
|
@ -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
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren