3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-16 04:50:08 +01:00

Write enabled features as string array

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-10-27 16:02:37 +01:00
Ursprung f56bfbebb5
Commit 3caaed00dc
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F

Datei anzeigen

@ -63,10 +63,9 @@ public final class EntityPacketRewriter1_19_3 extends EntityRewriter<Clientbound
handler(worldDataTrackerHandlerByKey());
handler(playerTrackerHandler());
handler(wrapper -> {
// Also enable vanilla features
// Also enable vanilla features (set by default in later versions, but keeping it explicit is nicer)
final PacketWrapper enableFeaturesPacket = wrapper.create(ClientboundPackets1_19_3.UPDATE_ENABLED_FEATURES);
enableFeaturesPacket.write(Types.VAR_INT, 1);
enableFeaturesPacket.write(Types.STRING, "minecraft:vanilla");
enableFeaturesPacket.write(Types.STRING_ARRAY, new String[]{"minecraft:vanilla"});
if (wrapper.user().getProtocolInfo().protocolVersion().newerThanOrEqualTo(ProtocolVersion.v1_20_2)) {
// Make sure it's included in the configuration packets