Include 1.20.4 in .3 version range

This commit is contained in:
Nassim Jahnke 2023-12-07 22:22:30 +01:00
parent 9a7def62b9
commit f762da2725
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
2 changed files with 3 additions and 7 deletions

View File

@ -85,7 +85,7 @@ public class ProtocolVersion {
public static final ProtocolVersion v1_19_4 = register(762, "1.19.4");
public static final ProtocolVersion v1_20 = register(763, "1.20/1.20.1", new VersionRange("1.20", 0, 1));
public static final ProtocolVersion v1_20_2 = register(764, "1.20.2");
public static final ProtocolVersion v1_20_3 = register(765, "1.20.3");
public static final ProtocolVersion v1_20_3 = register(765, "1.20.3/1.20.4", new VersionRange("1.20", 3, 4));
public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
public static ProtocolVersion register(int version, String name) {

View File

@ -273,12 +273,8 @@ public final class Protocol1_20_2To1_20 extends AbstractProtocol<ClientboundPack
registryDataPacket.write(Type.COMPOUND_TAG, dimensionRegistry);
registryDataPacket.send(Protocol1_20_2To1_20.class);
// Enabling features is only possible during the configuration phase
// TODO Sad emoji
final PacketWrapper enableFeaturesPacket = PacketWrapper.create(ClientboundConfigurationPackets1_20_2.UPDATE_ENABLED_FEATURES, connection);
enableFeaturesPacket.write(Type.VAR_INT, 1);
enableFeaturesPacket.write(Type.STRING, "minecraft:vanilla");
enableFeaturesPacket.send(Protocol1_20_2To1_20.class);
// If we tracked enables features, they'd be sent here
// The client includes vanilla as the default feature when initially leaving the login phase
final LastTags lastTags = connection.get(LastTags.class);
if (lastTags != null) {