From 29d3787de843734e2dfbb869a14117ba119b1fd0 Mon Sep 17 00:00:00 2001 From: KennyTV Date: Sat, 3 Jul 2021 10:35:59 +0200 Subject: [PATCH] =?UTF-8?q?Send=20doubled=20respawn=20anyways=20for=20<=20?= =?UTF-8?q?1.13=20clients=20=F0=9F=92=A9=20Fixes=20#381=20(dirty=20hotfix)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../protocol1_15_2to1_16/packets/EntityPackets1_16.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/packets/EntityPackets1_16.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/packets/EntityPackets1_16.java index da7bf947..7e55440a 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/packets/EntityPackets1_16.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/packets/EntityPackets1_16.java @@ -30,6 +30,7 @@ import com.viaversion.viaversion.api.minecraft.metadata.types.MetaType1_14; import com.viaversion.viaversion.api.protocol.packet.PacketWrapper; import com.viaversion.viaversion.api.protocol.remapper.PacketRemapper; import com.viaversion.viaversion.api.protocol.remapper.ValueTransformer; +import com.viaversion.viaversion.api.protocol.version.ProtocolVersion; import com.viaversion.viaversion.api.type.Type; import com.viaversion.viaversion.api.type.types.Particle; import com.viaversion.viaversion.api.type.types.version.Types1_14; @@ -114,7 +115,9 @@ public class EntityPackets1_16 extends EntityRewriter { // Send a dummy respawn with a different dimension if the world name was different and the same dimension was used if (clientWorld.getEnvironment() != null && dimension == clientWorld.getEnvironment().getId() - && (wrapper.user().isClientSide() || Via.getPlatform().isProxy() || !nextWorldName.equals(worldNameTracker.getWorldName()))) { + && (wrapper.user().isClientSide() || Via.getPlatform().isProxy() + || wrapper.user().getProtocolInfo().getProtocolVersion() <= ProtocolVersion.v1_12_2.getVersion() // Hotfix for https://github.com/ViaVersion/ViaBackwards/issues/381 + || !nextWorldName.equals(worldNameTracker.getWorldName()))) { PacketWrapper packet = wrapper.create(ClientboundPackets1_15.RESPAWN); packet.write(Type.INT, dimension == 0 ? -1 : 0); packet.write(Type.LONG, 0L);