Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-20 06:50:08 +01:00
Don't resend pack in 1.20->1.20.2 for 1.20.3 clients
Dieser Commit ist enthalten in:
Ursprung
a0f8ab7bbb
Commit
151ecdcd72
@ -30,6 +30,7 @@ import com.viaversion.viaversion.api.protocol.packet.Direction;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.protocol.packet.State;
|
||||
import com.viaversion.viaversion.api.protocol.remapper.PacketHandler;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viaversion.api.rewriter.EntityRewriter;
|
||||
import com.viaversion.viaversion.api.rewriter.ItemRewriter;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
@ -304,7 +305,7 @@ public final class Protocol1_20_2To1_20 extends AbstractProtocol<ClientboundPack
|
||||
lastTags.sendLastTags(connection);
|
||||
}
|
||||
|
||||
if (lastResourcePack != null) {
|
||||
if (lastResourcePack != null && connection.getProtocolInfo().getProtocolVersion() == ProtocolVersion.v1_20_2.getVersion()) {
|
||||
// The client for some reason drops the resource pack when reentering the configuration state
|
||||
final PacketWrapper resourcePackPacket = PacketWrapper.create(ClientboundConfigurationPackets1_20_2.RESOURCE_PACK, connection);
|
||||
resourcePackPacket.write(Type.STRING, lastResourcePack.url());
|
||||
|
@ -327,6 +327,7 @@ public final class Protocol1_20_3To1_20_2 extends AbstractProtocol<ClientboundPa
|
||||
registerClientbound(State.CONFIGURATION, ClientboundConfigurationPackets1_20_2.UPDATE_TAGS.getId(), ClientboundConfigurationPackets1_20_3.UPDATE_TAGS.getId());
|
||||
}
|
||||
|
||||
// TODO Drop old resource packs
|
||||
private PacketHandler resourcePackHandler() {
|
||||
return wrapper -> {
|
||||
wrapper.write(Type.UUID, UUID.randomUUID());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren