Update #24 - 1000s of optimizations, shared worlds on desktop

This commit is contained in:
lax1dude
2024-03-02 20:51:44 -08:00
parent a50c93cb75
commit 8ab65942c5
624 changed files with 8091 additions and 3620 deletions

View File

@ -1,6 +1,5 @@
package net.lax1dude.eaglercraft.v1_8.socket;
import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
@ -8,6 +7,7 @@ import java.nio.charset.StandardCharsets;
import net.lax1dude.eaglercraft.v1_8.ArrayUtils;
import net.lax1dude.eaglercraft.v1_8.EaglerInputStream;
import net.lax1dude.eaglercraft.v1_8.EaglerOutputStream;
import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
import net.lax1dude.eaglercraft.v1_8.crypto.SHA256Digest;
@ -56,7 +56,7 @@ public class ConnectionHandshake {
try {
pluginVersion = null;
pluginBrand = null;
ByteArrayOutputStream bao = new ByteArrayOutputStream();
EaglerOutputStream bao = new EaglerOutputStream();
DataOutputStream d = new DataOutputStream(bao);
d.writeByte(HandshakePacketTypes.PROTOCOL_CLIENT_VERSION);

View File

@ -91,7 +91,8 @@ public class EaglercraftNetworkManager {
return;
}
for(byte[] next : pkts) {
for(int i = 0, l = pkts.size(); i < l; ++i) {
byte[] next = pkts.get(i);
++debugPacketCounter;
try {
ByteBuf nettyBuffer = Unpooled.buffer(next, next.length);