Mirror von
https://github.com/ViaVersion/ViaBackwards.git
synchronisiert 2024-11-17 13:30:14 +01:00
Send doubled respawn anyways for < 1.13 clients đź’©
Fixes #381 (dirty hotfix)
Dieser Commit ist enthalten in:
Ursprung
59df758ceb
Commit
29d3787de8
@ -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<Protocol1_15_2To1_16> {
|
||||
|
||||
// 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);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren