SteamWar/BungeeCore
Archiviert
13
2

Forge Mod detection #292

Zusammengeführt
Lixfel hat 11 Commits von ModDetection1.13+ nach master 2022-02-03 22:06:16 +01:00 zusammengeführt
Nur Änderungen aus Commit 70056b838e werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -101,13 +101,18 @@ public class Forge extends BasicListener {
}
//for more information see https://wiki.vg/Minecraft_Forge_Handshake#FML2_protocol_.281.13_-_Current.29
Utils.VarInt length = Utils.readVarInt(data, 0);
assert length.length + length.value == data.length;
Utils.VarInt channelLength = Utils.readVarInt(data, 0);
int pos = channelLength.length;
assert new String(data, pos, channelLength.value).equals("fml:handshake");
Utils.VarInt packetId = Utils.readVarInt(data, length.length);
Utils.VarInt length = Utils.readVarInt(data, pos);
pos += length.length;
assert channelLength.length + channelLength.value + length.length + length.value == data.length;
Utils.VarInt packetId = Utils.readVarInt(data, pos);
pos += packetId.length;
assert packetId.value == 2;
int pos = length.length + packetId.length;
Utils.VarInt modCount = Utils.readVarInt(data, pos);
pos += modCount.length;