From 2748624dde3aafe71efd04cf77f21ca260f3cb78 Mon Sep 17 00:00:00 2001 From: KennyTV Date: Sat, 11 Jul 2020 22:29:19 +0200 Subject: [PATCH] Write default registry for 1.16/1.16.1 clients Actually processing the monster that is the .2 registry would be unreasonable, and there shouldn't be any reason to keep using those two versions (and not -1.15.2 or +1.16.2) --- .../packets/EntityPackets1_16_2.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_16_1to1_16_2/packets/EntityPackets1_16_2.java b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_16_1to1_16_2/packets/EntityPackets1_16_2.java index dc7c9775..f1bc8c56 100644 --- a/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_16_1to1_16_2/packets/EntityPackets1_16_2.java +++ b/core/src/main/java/nl/matsv/viabackwards/protocol/protocol1_16_1to1_16_2/packets/EntityPackets1_16_2.java @@ -13,6 +13,7 @@ import us.myles.ViaVersion.api.remapper.PacketRemapper; import us.myles.ViaVersion.api.type.Type; import us.myles.ViaVersion.api.type.types.version.Types1_14; import us.myles.ViaVersion.protocols.protocol1_16_2to1_16_1.ClientboundPackets1_16_2; +import us.myles.ViaVersion.protocols.protocol1_16to1_15_2.packets.EntityPackets; import us.myles.ViaVersion.protocols.protocol1_9_3to1_9_1_2.storage.ClientWorld; import us.myles.viaversion.libs.gson.JsonElement; @@ -46,7 +47,11 @@ public class EntityPackets1_16_2 extends EntityRewriter }); map(Type.BYTE); // Previous Gamemode map(Type.STRING_ARRAY); // World List - map(Type.NBT); // Dimension Registry + handler(wrapper -> { + // Just screw the registry and write the defaults for 1.16 and 1.16.1 clients + wrapper.read(Type.NBT); + wrapper.write(Type.NBT, EntityPackets.DIMENSIONS_TAG); + }); map(Type.STRING); // Dimension Type map(Type.STRING); // Dimension map(Type.LONG); // Seed