Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-25 15:50:10 +01:00
Update mcstructs and use new component serializer
Dieser Commit ist enthalten in:
Ursprung
bd3f1206e6
Commit
dc6d581123
@ -370,7 +370,7 @@ public class ComponentRewriter1_20_5 extends ComponentRewriter<ClientboundPacket
|
||||
predicateTag.put("state", state);
|
||||
}
|
||||
if (predicate.tag() != null) {
|
||||
predicateTag.putString("nbt", SerializerVersion.V1_20_3.toSNBT(predicate.tag()));
|
||||
predicateTag.putString("nbt", serializerVersion().toSNBT(predicate.tag()));
|
||||
}
|
||||
|
||||
predicates.add(predicateTag);
|
||||
@ -1045,7 +1045,7 @@ public class ComponentRewriter1_20_5 extends ComponentRewriter<ClientboundPacket
|
||||
}
|
||||
|
||||
public SerializerVersion serializerVersion() {
|
||||
return SerializerVersion.V1_20_3;
|
||||
return SerializerVersion.V1_20_5;
|
||||
}
|
||||
|
||||
@FunctionalInterface
|
||||
|
@ -94,7 +94,7 @@ public final class ComponentUtil {
|
||||
|
||||
public static @Nullable String tagToJsonString(@Nullable final Tag tag) {
|
||||
try {
|
||||
final ATextComponent component = SerializerVersion.V1_20_3.toComponent(tag);
|
||||
final ATextComponent component = SerializerVersion.V1_20_5.toComponent(tag);
|
||||
return component != null ? SerializerVersion.V1_20_3.toString(component) : null;
|
||||
} catch (final Exception e) {
|
||||
Via.getPlatform().getLogger().log(Level.SEVERE, "Error converting tag: " + tag, e);
|
||||
@ -109,7 +109,7 @@ public final class ComponentUtil {
|
||||
|
||||
try {
|
||||
final ATextComponent component = TextComponentSerializer.V1_20_3.deserialize(json);
|
||||
return SerializerVersion.V1_20_3.toTag(component);
|
||||
return SerializerVersion.V1_20_5.toTag(component);
|
||||
} catch (final Exception e) {
|
||||
Via.getPlatform().getLogger().log(Level.SEVERE, "Error converting component: " + json, e);
|
||||
return new StringTag("<error>");
|
||||
|
@ -39,7 +39,8 @@ public enum SerializerVersion {
|
||||
V1_17(TextComponentSerializer.V1_17, SNbtSerializer.V1_14),
|
||||
V1_18(TextComponentSerializer.V1_18, SNbtSerializer.V1_14),
|
||||
V1_19_4(TextComponentSerializer.V1_19_4, SNbtSerializer.V1_14),
|
||||
V1_20_3(TextComponentCodec.V1_20_3, SNbtSerializer.V1_14);
|
||||
V1_20_3(TextComponentCodec.V1_20_3, SNbtSerializer.V1_14),
|
||||
V1_20_5(TextComponentCodec.V1_20_5, SNbtSerializer.V1_14);
|
||||
|
||||
final TextComponentSerializer jsonSerializer;
|
||||
final SNbtSerializer<? extends Tag> snbtSerializer;
|
||||
|
@ -5,7 +5,7 @@ metadata.format.version = "1.1"
|
||||
gson = "2.10.1"
|
||||
fastutil = "8.5.12"
|
||||
vianbt = "4.4.3"
|
||||
mcstructs = "2.4.2"
|
||||
mcstructs = "2.5.0-SNAPSHOT"
|
||||
|
||||
# Common provided
|
||||
netty = "4.0.20.Final"
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren