Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-11-20 06:50:08 +01:00
1.19.4-rc3
Dieser Commit ist enthalten in:
Ursprung
e8b4496289
Commit
10c4d9408e
@ -82,7 +82,7 @@ public class ProtocolVersion {
|
||||
public static final ProtocolVersion v1_19 = register(759, "1.19");
|
||||
public static final ProtocolVersion v1_19_1 = register(760, "1.19.1/2", new VersionRange("1.19", 1, 2));
|
||||
public static final ProtocolVersion v1_19_3 = register(761, "1.19.3");
|
||||
public static final ProtocolVersion v1_19_4 = register(762, 125, "1.19.4");
|
||||
public static final ProtocolVersion v1_19_4 = register(762, 126, "1.19.4");
|
||||
public static final ProtocolVersion unknown = register(-1, "UNKNOWN");
|
||||
|
||||
public static ProtocolVersion register(int version, String name) {
|
||||
|
@ -50,6 +50,11 @@ public class Position1_14Type extends Type<Position> {
|
||||
| ((((long) object.z()) & 0x3ffffff) << 12));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends Type> getBaseClass() {
|
||||
return PositionType.class;
|
||||
}
|
||||
|
||||
public static final class OptionalPosition1_14Type extends OptionalType<Position> {
|
||||
|
||||
public OptionalPosition1_14Type() {
|
||||
|
@ -18,7 +18,6 @@
|
||||
package com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3;
|
||||
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.viaversion.viaversion.api.connection.UserConnection;
|
||||
import com.viaversion.viaversion.api.minecraft.entities.Entity1_19_4Types;
|
||||
import com.viaversion.viaversion.api.protocol.AbstractProtocol;
|
||||
@ -27,6 +26,8 @@ import com.viaversion.viaversion.api.type.Type;
|
||||
import com.viaversion.viaversion.api.type.types.minecraft.ParticleType;
|
||||
import com.viaversion.viaversion.api.type.types.version.Types1_19_4;
|
||||
import com.viaversion.viaversion.data.entity.EntityTrackerBase;
|
||||
import com.viaversion.viaversion.libs.kyori.adventure.text.Component;
|
||||
import com.viaversion.viaversion.libs.kyori.adventure.text.serializer.gson.GsonComponentSerializer;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.ClientboundPackets1_19_3;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_3to1_19_1.ServerboundPackets1_19_3;
|
||||
import com.viaversion.viaversion.protocols.protocol1_19_4to1_19_3.data.MappingData;
|
||||
@ -41,6 +42,7 @@ import java.util.Base64;
|
||||
public final class Protocol1_19_4To1_19_3 extends AbstractProtocol<ClientboundPackets1_19_3, ClientboundPackets1_19_4, ServerboundPackets1_19_3, ServerboundPackets1_19_4> {
|
||||
|
||||
public static final MappingData MAPPINGS = new MappingData();
|
||||
private static final JsonElement EMPTY_COMPONENT = GsonComponentSerializer.gson().serializeToTree(Component.empty());
|
||||
private final EntityPackets entityRewriter = new EntityPackets(this);
|
||||
private final InventoryPackets itemRewriter = new InventoryPackets(this);
|
||||
|
||||
@ -58,6 +60,7 @@ public final class Protocol1_19_4To1_19_3 extends AbstractProtocol<ClientboundPa
|
||||
soundRewriter.registerSound(ClientboundPackets1_19_3.ENTITY_SOUND);
|
||||
soundRewriter.register1_19_3Sound(ClientboundPackets1_19_3.SOUND);
|
||||
|
||||
|
||||
new CommandRewriter<ClientboundPackets1_19_3>(this) {
|
||||
@Override
|
||||
public void handleArgument(final PacketWrapper wrapper, final String argumentType) throws Exception {
|
||||
@ -72,10 +75,11 @@ public final class Protocol1_19_4To1_19_3 extends AbstractProtocol<ClientboundPa
|
||||
|
||||
registerClientbound(ClientboundPackets1_19_3.SERVER_DATA, wrapper -> {
|
||||
JsonElement element = wrapper.read(Type.OPTIONAL_COMPONENT);
|
||||
if (element == null) {
|
||||
element = new JsonObject();
|
||||
}
|
||||
if (element != null) {
|
||||
wrapper.write(Type.COMPONENT, element);
|
||||
} else {
|
||||
wrapper.write(Type.COMPONENT, EMPTY_COMPONENT);
|
||||
}
|
||||
|
||||
final String iconBase64 = wrapper.read(Type.OPTIONAL_STRING);
|
||||
final byte[] iconBytes = iconBase64 != null ? Base64.getDecoder().decode(iconBase64.substring("data:image/png;base64,".length()).getBytes(StandardCharsets.UTF_8)) : null;
|
||||
|
@ -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.6.0-1.19.4-rc2-SNAPSHOT
|
||||
projectVersion=4.6.0-1.19.4-rc3-SNAPSHOT
|
||||
|
||||
# Gradle properties
|
||||
org.gradle.daemon=true
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren