mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-12-23 17:08:15 +01:00
Don't resend pack in 1.20->1.20.2 for 1.20.3 clients
This commit is contained in:
parent
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());
|
||||
|
Loading…
Reference in New Issue
Block a user