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

Fix lower version support (default to client version if we can't port it instead of server) #519

Dieser Commit ist enthalten in:
Myles 2016-10-23 21:18:18 +01:00
Ursprung f92b7e5b80
Commit b6dbe82d16

Datei anzeigen

@ -110,14 +110,16 @@ public class BungeeEncodeHandler extends MessageToMessageEncoder<ByteBuf> {
// Refresh the pipes
List<Pair<Integer, Protocol>> protocols = ProtocolRegistry.getProtocolPath(info.getProtocolVersion(), protocolId);
ProtocolPipeline pipeline = viaConnection.get(ProtocolInfo.class).getPipeline();
viaConnection.clearStoredObjects();
pipeline.cleanPipes();
if (protocols != null)
if (protocols == null) {
// TODO Check Bungee Supported Protocols? *shrugs*
protocolId = info.getProtocolVersion();
} else {
for (Pair<Integer, Protocol> prot : protocols) {
pipeline.add(prot.getValue());
}
}
viaConnection.put(info);
viaConnection.put(storage);
@ -138,6 +140,7 @@ public class BungeeEncodeHandler extends MessageToMessageEncoder<ByteBuf> {
}
}
}
private static Method getEntityMap = null;
private static Method setVersion = null;
private static Field entityRewrite = null;