3
0
Mirror von https://github.com/ViaVersion/ViaBackwards.git synchronisiert 2024-07-03 14:18:03 +02:00
Dieser Commit ist enthalten in:
Nassim Jahnke 2022-10-26 18:28:53 +02:00
Ursprung 808b1fd2f0
Commit 9a9c6c4644
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B
4 geänderte Dateien mit 6 neuen und 13 gelöschten Zeilen

Datei anzeigen

@ -5,7 +5,7 @@ plugins {
allprojects {
group = "com.viaversion"
version = "4.5.0-22w42a-SNAPSHOT"
version = "4.5.0-22w43a-SNAPSHOT"
description = "Allow older clients to join newer server versions."
}

Datei anzeigen

@ -154,10 +154,7 @@ public final class Protocol1_19_1To1_19_3 extends BackwardsProtocol<ClientboundP
public void registerMap() {
map(Type.STRING); // Name
handler(wrapper -> {
wrapper.write(Type.UUID, wrapper.user().get(ChatSessionStorage.class).uuid()); // Session UUID
final ProfileKey profileKey = wrapper.read(Type.OPTIONAL_PROFILE_KEY);
wrapper.write(Type.OPTIONAL_PROFILE_KEY, null);
if (profileKey == null) {
wrapper.user().put(new NonceStorage(null));
}
@ -184,15 +181,11 @@ public final class Protocol1_19_1To1_19_3 extends BackwardsProtocol<ClientboundP
map(Type.BYTE_ARRAY_PRIMITIVE); // Keys
handler(wrapper -> {
final NonceStorage nonceStorage = wrapper.user().remove(NonceStorage.class);
if (nonceStorage.nonce() == null) {
return;
}
final boolean isNonce = wrapper.read(Type.BOOLEAN);
wrapper.write(Type.BOOLEAN, true);
if (!isNonce) { // Should never be true at this point, but /shrug otherwise
if (!isNonce) {
wrapper.read(Type.LONG); // Salt
wrapper.read(Type.BYTE_ARRAY_PRIMITIVE); // Signature
wrapper.write(Type.BYTE_ARRAY_PRIMITIVE, nonceStorage.nonce());
wrapper.write(Type.BYTE_ARRAY_PRIMITIVE, nonceStorage.nonce() != null ? nonceStorage.nonce() : new byte[0]);
}
});
}

Datei anzeigen

@ -126,9 +126,9 @@ public final class EntityPackets1_19_3 extends EntityRewriter<Protocol1_19_1To1_
// Now check for the other parts individually and add dummy values if not present
final ProfileKey profileKey;
if (actions.get(INITIALIZE_CHAT)) {
if (actions.get(INITIALIZE_CHAT) && wrapper.read(Type.BOOLEAN)) {
wrapper.read(Type.UUID); // Session UUID
profileKey = wrapper.read(Type.OPTIONAL_PROFILE_KEY);
profileKey = wrapper.read(Type.PROFILE_KEY);
} else {
profileKey = null;
}

Datei anzeigen

@ -3,7 +3,7 @@ metadata.format.version = "1.1"
[versions]
# ViaVersion
viaver = "4.5.0-22w42a-SNAPSHOT"
viaver = "4.5.0-22w43a-SNAPSHOT"
# Common provided
netty = "4.0.20.Final"