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

Remove version check for getting protocol path

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-05-13 13:32:51 +02:00
Ursprung 9fd40395eb
Commit 0fc0259d8c
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
2 geänderte Dateien mit 2 neuen und 11 gelöschten Zeilen

Datei anzeigen

@ -79,13 +79,9 @@ public class BaseProtocol extends AbstractProtocol<BaseClientboundPacket, BaseCl
} }
info.setServerProtocolVersion(serverProtocol); info.setServerProtocolVersion(serverProtocol);
List<ProtocolPathEntry> protocolPath = null;
// Only allow newer clients (or 1.9.2 on 1.9.4 server if the server supports it)
ProtocolManager protocolManager = Via.getManager().getProtocolManager(); ProtocolManager protocolManager = Via.getManager().getProtocolManager();
if (info.protocolVersion().newerThanOrEqualTo(serverProtocol)) { List<ProtocolPathEntry> protocolPath = protocolManager.getProtocolPath(info.protocolVersion(), serverProtocol);
protocolPath = protocolManager.getProtocolPath(info.protocolVersion(), serverProtocol);
}
// Add Base Protocol // Add Base Protocol
ProtocolPipeline pipeline = info.getPipeline(); ProtocolPipeline pipeline = info.getPipeline();

Datei anzeigen

@ -106,12 +106,7 @@ public class BaseProtocol1_7 extends AbstractProtocol<BaseClientboundPacket, Bas
throw new RuntimeException(e); throw new RuntimeException(e);
} }
List<ProtocolPathEntry> protocols = null; List<ProtocolPathEntry> protocols = Via.getManager().getProtocolManager().getProtocolPath(info.protocolVersion(), closestServerProtocol);
if (info.protocolVersion().newerThanOrEqualTo(closestServerProtocol)) {
protocols = Via.getManager().getProtocolManager()
.getProtocolPath(info.protocolVersion(), closestServerProtocol);
}
if (protocols != null) { if (protocols != null) {
if (protocolVersion.equalTo(closestServerProtocol) || protocolVersion.getVersion() == 0) { // Fix ServerListPlus if (protocolVersion.equalTo(closestServerProtocol) || protocolVersion.getVersion() == 0) { // Fix ServerListPlus
version.addProperty("protocol", info.protocolVersion().getOriginalVersion()); version.addProperty("protocol", info.protocolVersion().getOriginalVersion());