Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-11-17 13:30:14 +01:00
Add statistics handler to 1.19.4->1.19.3 protocol
Dieser Commit ist enthalten in:
Ursprung
d271d3d687
Commit
4fb9fdab9b
@ -5,7 +5,7 @@ plugins {
|
||||
|
||||
allprojects {
|
||||
group = "com.viaversion"
|
||||
version = "4.7.0-1.20-pre3-SNAPSHOT"
|
||||
version = "4.7.0-1.20-pre5-SNAPSHOT"
|
||||
description = "Allow older clients to join newer server versions."
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ClientboundPac
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.Protocol1_19_4To1_19_3;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.ServerboundPackets1_19_4;
|
||||
import com.viaversion.viaversion.rewriter.CommandRewriter;
|
||||
import com.viaversion.viaversion.rewriter.StatisticsRewriter;
|
||||
import com.viaversion.viaversion.rewriter.TagRewriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Base64;
|
||||
@ -98,6 +99,8 @@ public final class Protocol1_19_3To1_19_4 extends BackwardsProtocol<ClientboundP
|
||||
tagRewriter.removeTags("minecraft:damage_type");
|
||||
tagRewriter.registerGeneric(ClientboundPackets1_19_4.TAGS);
|
||||
|
||||
new StatisticsRewriter<>(this).register(ClientboundPackets1_19_4.STATISTICS);
|
||||
|
||||
registerClientbound(ClientboundPackets1_19_4.SERVER_DATA, wrapper -> {
|
||||
final JsonElement element = wrapper.read(Type.COMPONENT);
|
||||
wrapper.write(Type.OPTIONAL_COMPONENT, element);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren