mirror of
https://github.com/ViaVersion/ViaBackwards.git
synced 2024-12-18 16:17:45 +01:00
parent
c5dacad81e
commit
14e208e9d7
@ -34,7 +34,7 @@ import com.viaversion.viaversion.protocols.v1_19_3to1_19_4.packet.ServerboundPac
|
||||
import com.viaversion.viaversion.rewriter.ComponentRewriter;
|
||||
import com.viaversion.viaversion.rewriter.StatisticsRewriter;
|
||||
import com.viaversion.viaversion.rewriter.TagRewriter;
|
||||
import java.util.Arrays;
|
||||
import com.viaversion.viaversion.util.ArrayUtil;
|
||||
|
||||
public final class Protocol1_20To1_19_4 extends BackwardsProtocol<ClientboundPackets1_19_4, ClientboundPackets1_19_4, ServerboundPackets1_19_4, ServerboundPackets1_19_4> {
|
||||
|
||||
@ -75,10 +75,7 @@ public final class Protocol1_20To1_19_4 extends BackwardsProtocol<ClientboundPac
|
||||
|
||||
registerClientbound(ClientboundPackets1_19_4.UPDATE_ENABLED_FEATURES, wrapper -> {
|
||||
String[] enabledFeatures = wrapper.read(Types.STRING_ARRAY);
|
||||
final int length = enabledFeatures.length;
|
||||
enabledFeatures = Arrays.copyOf(enabledFeatures, length + 1);
|
||||
enabledFeatures[length] = "minecraft:update_1_20";
|
||||
wrapper.write(Types.STRING_ARRAY, enabledFeatures);
|
||||
wrapper.write(Types.STRING_ARRAY, ArrayUtil.add(enabledFeatures, "minecraft:update_1_20"));
|
||||
});
|
||||
|
||||
registerClientbound(ClientboundPackets1_19_4.PLAYER_COMBAT_END, wrapper -> {
|
||||
|
@ -45,6 +45,7 @@ import com.viaversion.viaversion.protocols.v1_20_5to1_21.packet.ClientboundPacke
|
||||
import com.viaversion.viaversion.protocols.v1_20_5to1_21.packet.ClientboundPackets1_21;
|
||||
import com.viaversion.viaversion.rewriter.StatisticsRewriter;
|
||||
import com.viaversion.viaversion.rewriter.TagRewriter;
|
||||
import com.viaversion.viaversion.util.ArrayUtil;
|
||||
|
||||
import static com.viaversion.viaversion.util.ProtocolUtil.packetTypeMap;
|
||||
|
||||
@ -174,6 +175,11 @@ public final class Protocol1_21To1_20_5 extends BackwardsProtocol<ClientboundPac
|
||||
wrapper.set(Types.VAR_INT, 1, newSize);
|
||||
}
|
||||
});
|
||||
|
||||
registerClientbound(ClientboundConfigurationPackets1_21.UPDATE_ENABLED_FEATURES, wrapper -> {
|
||||
final String[] enabledFeatures = wrapper.read(Types.STRING_ARRAY);
|
||||
wrapper.write(Types.STRING_ARRAY, ArrayUtil.add(enabledFeatures, "minecraft:update_1_21"));
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3,7 +3,7 @@ metadata.format.version = "1.1"
|
||||
[versions]
|
||||
|
||||
# ViaVersion
|
||||
viaver = "5.0.0"
|
||||
viaver = "5.0.1-SNAPSHOT"
|
||||
|
||||
# Common provided
|
||||
netty = "4.0.20.Final"
|
||||
|
Loading…
Reference in New Issue
Block a user