Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +01:00
1.19.1-rc2
Dieser Commit ist enthalten in:
Ursprung
44250cbb99
Commit
f42a308f2c
@ -81,7 +81,7 @@ public class ProtocolVersion {
|
||||
public static final ProtocolVersion v1_18 = register(757, "1.18/1.18.1", new VersionRange("1.18", 0, 1));
|
||||
public static final ProtocolVersion v1_18_2 = register(758, "1.18.2");
|
||||
public static final ProtocolVersion v1_19 = register(759, "1.19");
|
||||
public static final ProtocolVersion v1_19_1 = register(760, 99, "1.19.1");
|
||||
public static final ProtocolVersion v1_19_1 = register(760, 100, "1.19.1");
|
||||
public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
|
||||
|
||||
public static ProtocolVersion register(int version, String name) {
|
||||
|
@ -113,6 +113,7 @@ public abstract class Type<T> implements ByteBufReader<T>, ByteBufWriter<T> {
|
||||
public static final Type<JsonElement> OPTIONAL_COMPONENT = new OptionalComponentType();
|
||||
|
||||
public static final Type<String> STRING = new StringType();
|
||||
public static final Type<String> OPTIONAL_STRING = new StringType.OptionalStringType();
|
||||
public static final Type<String[]> STRING_ARRAY = new ArrayType<>(Type.STRING);
|
||||
|
||||
public static final Type<UUID> UUID = new UUIDType();
|
||||
|
@ -23,6 +23,7 @@
|
||||
package com.viaversion.viaversion.api.type.types;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.viaversion.viaversion.api.type.OptionalType;
|
||||
import com.viaversion.viaversion.api.type.Type;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
|
||||
@ -67,4 +68,11 @@ public class StringType extends Type<String> {
|
||||
Type.VAR_INT.writePrimitive(buffer, b.length);
|
||||
buffer.writeBytes(b);
|
||||
}
|
||||
|
||||
public static final class OptionalStringType extends OptionalType<String> {
|
||||
|
||||
public OptionalStringType() {
|
||||
super(Type.STRING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ public final class Protocol1_19_1To1_19 extends AbstractProtocol<ClientboundPack
|
||||
@Override
|
||||
public void registerMap() {
|
||||
handler(wrapper -> {
|
||||
// Back to system chat - bye bye chat formats for 1.19.0 players
|
||||
// Back to system chat - bye bye chat formats for 1.19.0 servers
|
||||
// ... not that big of a deal since the majority of modded servers only has Vanilla /say command and the alike sent as proper player chat
|
||||
final JsonElement signedContent = wrapper.read(Type.COMPONENT);
|
||||
final JsonElement unsignedContent = wrapper.read(Type.OPTIONAL_COMPONENT);
|
||||
@ -105,7 +105,7 @@ public final class Protocol1_19_1To1_19 extends AbstractProtocol<ClientboundPack
|
||||
});
|
||||
read(Type.UUID); // Sender uuid
|
||||
read(Type.COMPONENT); // Sender display name
|
||||
read(Type.OPTIONAL_COMPONENT); // Team display name
|
||||
read(Type.OPTIONAL_COMPONENT); // Target display name
|
||||
read(Type.LONG); // Timestamp
|
||||
read(Type.LONG); // Salt
|
||||
read(Type.BYTE_ARRAY_PRIMITIVE); // Signature
|
||||
@ -160,6 +160,16 @@ public final class Protocol1_19_1To1_19 extends AbstractProtocol<ClientboundPack
|
||||
}
|
||||
});
|
||||
|
||||
registerClientbound(ClientboundPackets1_19.SERVER_DATA, new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
map(Type.OPTIONAL_COMPONENT); // Motd
|
||||
map(Type.OPTIONAL_STRING); // Encoded icon
|
||||
map(Type.BOOLEAN); // Previews chat
|
||||
create(Type.BOOLEAN, false); // Enforces secure chat
|
||||
}
|
||||
});
|
||||
|
||||
registerServerbound(State.LOGIN, ServerboundLoginPackets.HELLO.getId(), ServerboundLoginPackets.HELLO.getId(), new PacketRemapper() {
|
||||
@Override
|
||||
public void registerMap() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Project properties - we put these here so they can be modified without causing a recompile of the build scripts
|
||||
projectVersion=4.4.0-1.19.1-pre6-SNAPSHOT
|
||||
projectVersion=4.4.0-1.19.1-rc2-SNAPSHOT
|
||||
|
||||
# Gradle properties
|
||||
org.gradle.daemon=true
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren