Rewrite statistics for 1.19 (#2954)

This commit is contained in:
Camotoy 2022-06-15 04:13:14 -04:00 committed by GitHub
parent 24d887a53d
commit c4d9209c81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -49,6 +49,7 @@ import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.storage.NonceSto
import com.viaversion.viaversion.protocols.protocol1_19to1_18_2.storage.SequenceStorage;
import com.viaversion.viaversion.rewriter.CommandRewriter;
import com.viaversion.viaversion.rewriter.SoundRewriter;
import com.viaversion.viaversion.rewriter.StatisticsRewriter;
import com.viaversion.viaversion.rewriter.TagRewriter;
import javax.crypto.Cipher;
@ -131,6 +132,8 @@ public final class Protocol1_19To1_18_2 extends AbstractProtocol<ClientboundPack
}
});
new StatisticsRewriter(this).register(ClientboundPackets1_18.STATISTICS);
final PacketHandler titleHandler = wrapper -> {
final JsonElement component = wrapper.read(Type.COMPONENT);
if (!component.isJsonNull()) {