mirror of
https://github.com/ViaVersion/ViaVersion.git
synced 2026-11-04 08:52:10 -05:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da7cc933d7 |
No files matched your search
@@ -52,10 +52,10 @@ public record SignText(Tag[] messages, Tag @Nullable [] filteredMessages, int co
|
||||
@Override
|
||||
public void write(final Ops ops, final SignText value) {
|
||||
ops.writeMap(map -> map
|
||||
.write("messages", Types.SIGN_TEXT, value.messages)
|
||||
.writeOptional("filtered_messages", Types.SIGN_TEXT, value.filteredMessages)
|
||||
.write("color", Types.VAR_INT, value.color, 15)
|
||||
.write("has_glowing_text", Types.BOOLEAN, value.hasGlowingText, false));
|
||||
.write("messages", Types.TEXT_COMPONENT_TAG_ARRAY, value.messages)
|
||||
.writeOptional("filtered_messages", Types.TEXT_COMPONENT_TAG_ARRAY, value.filteredMessages)
|
||||
.write("color", EnumTypes.DYE_COLOR, value.color)
|
||||
.write("has_glowing_text", Types.BOOLEAN, value.hasGlowingText));
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -227,6 +227,7 @@ public final class Types {
|
||||
public static final Type<Tag[]> TAG_ARRAY = new ArrayType<>(TAG);
|
||||
public static final Type<Tag> OPTIONAL_TAG = TagType.OptionalTagType.type();
|
||||
public static final Type<Tag> TEXT_COMPONENT_TAG = new TextComponentTagType(); // only strictly needed for hashing
|
||||
public static final Type<Tag[]> TEXT_COMPONENT_TAG_ARRAY = new ArrayType<>(Types.TEXT_COMPONENT_TAG);
|
||||
|
||||
public static final Type<Tag> CUSTOM_CLICK_ACTION_TAG = new LengthPrefixedTagType(65536);
|
||||
public static final FixedLengthArrayType<Tag> SIGN_TEXT = new FixedLengthArrayType<>(TAG, 4);
|
||||
|
||||
Reference in new issue
Block a user