Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-03 14:50:30 +01:00
Reduce useless List operations (#2214)
Dieser Commit ist enthalten in:
Ursprung
4555c5dbf3
Commit
6882678bc4
@ -487,11 +487,8 @@ 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.
|
// Move all packet values to the readable for next packet.
|
||||||
this.readableObjects.addAll(packetValues);
|
this.readableObjects.addAll(0, packetValues);
|
||||||
this.packetValues.clear();
|
this.packetValues.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren