mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-21 16:47:57 +01:00
Add statistics handler to 1.19.4->1.19.3 protocol
This commit is contained in:
parent
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);
|
||||
|
Loading…
Reference in New Issue
Block a user