mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2024-11-21 17:45:36 +01:00
Send enable features packet after the play login packet in 1.19.1->1.19.3 (#4205)
This commit is contained in:
parent
df69f1f344
commit
3eec520ebd
@ -22,6 +22,7 @@ import com.viaversion.viaversion.api.minecraft.entities.EntityType;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.EntityTypes1_19_3;
|
||||
import com.viaversion.viaversion.api.protocol.packet.PacketWrapper;
|
||||
import com.viaversion.viaversion.api.protocol.remapper.PacketHandlers;
|
||||
import com.viaversion.viaversion.api.protocol.version.ProtocolVersion;
|
||||
import com.viaversion.viaversion.api.type.Types;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_19;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_19_3;
|
||||
@ -66,7 +67,13 @@ public final class EntityPacketRewriter1_19_3 extends EntityRewriter<Clientbound
|
||||
final PacketWrapper enableFeaturesPacket = wrapper.create(ClientboundPackets1_19_3.UPDATE_ENABLED_FEATURES);
|
||||
enableFeaturesPacket.write(Types.VAR_INT, 1);
|
||||
enableFeaturesPacket.write(Types.STRING, "minecraft:vanilla");
|
||||
enableFeaturesPacket.scheduleSend(Protocol1_19_1To1_19_3.class);
|
||||
|
||||
if (wrapper.user().getProtocolInfo().protocolVersion().newerThanOrEqualTo(ProtocolVersion.v1_20_2)) {
|
||||
// Make sure it's included in the configuration packets
|
||||
enableFeaturesPacket.send(Protocol1_19_1To1_19_3.class);
|
||||
} else {
|
||||
enableFeaturesPacket.scheduleSend(Protocol1_19_1To1_19_3.class);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user