From 2a2cb9a90299227b417df4622d8ba932af03002f Mon Sep 17 00:00:00 2001 From: apple502j <33279053+apple502j@users.noreply.github.com> Date: Sat, 7 Oct 2023 00:59:55 +0900 Subject: [PATCH] 23w40a text (#3683) * 23w40a text * Javadocs --- mappings/net/minecraft/class_8828.mapping | 6 -- .../minecraft/text/BlockNbtDataSource.mapping | 4 + .../net/minecraft/text/ClickEvent.mapping | 11 +++ .../text/EntityNbtDataSource.mapping | 4 + .../net/minecraft/text/HoverEvent.mapping | 73 ++++++++++++++++++- .../minecraft/text/KeybindTextContent.mapping | 6 ++ .../net/minecraft/text/NbtDataSource.mapping | 3 + .../net/minecraft/text/NbtTextContent.mapping | 4 + .../minecraft/text/PlainTextContent.mapping | 13 ++++ .../minecraft/text/ScoreTextContent.mapping | 5 ++ .../text/SelectorTextContent.mapping | 4 + .../text/StorageNbtDataSource.mapping | 4 + mappings/net/minecraft/text/Style.mapping | 32 +++++++- mappings/net/minecraft/text/Text.mapping | 69 +++++++++++++++++- .../net/minecraft/text/TextCodecs.mapping | 52 +++++++++++++ .../net/minecraft/text/TextContent.mapping | 2 + .../text/TranslatableTextContent.mapping | 38 ++++++++++ 17 files changed, 317 insertions(+), 13 deletions(-) delete mode 100644 mappings/net/minecraft/class_8828.mapping create mode 100644 mappings/net/minecraft/text/PlainTextContent.mapping create mode 100644 mappings/net/minecraft/text/TextCodecs.mapping diff --git a/mappings/net/minecraft/class_8828.mapping b/mappings/net/minecraft/class_8828.mapping deleted file mode 100644 index c0d5085866..0000000000 --- a/mappings/net/minecraft/class_8828.mapping +++ /dev/null @@ -1,6 +0,0 @@ -CLASS net/minecraft/class_8828 - METHOD comp_737 string ()Ljava/lang/String; - CLASS class_2585 LiteralTextContent - FIELD comp_737 string Ljava/lang/String; - METHOD (Ljava/lang/String;)V - ARG 1 string diff --git a/mappings/net/minecraft/text/BlockNbtDataSource.mapping b/mappings/net/minecraft/text/BlockNbtDataSource.mapping index b829bb0c9f..cf7f8069d5 100644 --- a/mappings/net/minecraft/text/BlockNbtDataSource.mapping +++ b/mappings/net/minecraft/text/BlockNbtDataSource.mapping @@ -1,6 +1,8 @@ CLASS net/minecraft/class_2575 net/minecraft/text/BlockNbtDataSource FIELD comp_733 rawPos Ljava/lang/String; FIELD comp_734 pos Lnet/minecraft/class_2267; + FIELD field_46614 CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46615 TYPE Lnet/minecraft/class_7419$class_8827; METHOD (Ljava/lang/String;)V ARG 1 rawPath METHOD (Ljava/lang/String;Lnet/minecraft/class_2267;)V @@ -11,3 +13,5 @@ CLASS net/minecraft/class_2575 net/minecraft/text/BlockNbtDataSource ARG 1 o METHOD method_16121 parsePos (Ljava/lang/String;)Lnet/minecraft/class_2267; ARG 0 string + METHOD method_54226 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance diff --git a/mappings/net/minecraft/text/ClickEvent.mapping b/mappings/net/minecraft/text/ClickEvent.mapping index f8cf3b6345..ff16be27e6 100644 --- a/mappings/net/minecraft/text/ClickEvent.mapping +++ b/mappings/net/minecraft/text/ClickEvent.mapping @@ -1,6 +1,7 @@ CLASS net/minecraft/class_2558 net/minecraft/text/ClickEvent FIELD field_11740 value Ljava/lang/String; FIELD field_11741 action Lnet/minecraft/class_2558$class_2559; + FIELD field_46594 CODEC Lcom/mojang/serialization/Codec; METHOD (Lnet/minecraft/class_2558$class_2559;Ljava/lang/String;)V ARG 1 action ARG 2 value @@ -8,10 +9,20 @@ CLASS net/minecraft/class_2558 net/minecraft/text/ClickEvent ARG 1 o METHOD method_10844 getValue ()Ljava/lang/String; METHOD method_10845 getAction ()Lnet/minecraft/class_2558$class_2559; + METHOD method_54149 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance + METHOD method_54150 (Lnet/minecraft/class_2558;)Ljava/lang/String; + ARG 0 event + METHOD method_54151 (Lnet/minecraft/class_2558;)Lnet/minecraft/class_2558$class_2559; + ARG 0 event CLASS class_2559 Action FIELD field_11742 name Ljava/lang/String; FIELD field_11744 userDefinable Z + FIELD field_46595 UNVALIDATED_CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46596 CODEC Lcom/mojang/serialization/MapCodec; METHOD (Ljava/lang/String;ILjava/lang/String;Z)V ARG 3 name ARG 4 userDefinable METHOD method_10847 isUserDefinable ()Z + METHOD method_54152 validate (Lnet/minecraft/class_2558$class_2559;)Lcom/mojang/serialization/DataResult; + ARG 0 action diff --git a/mappings/net/minecraft/text/EntityNbtDataSource.mapping b/mappings/net/minecraft/text/EntityNbtDataSource.mapping index fae1fc80e7..0db5393cc2 100644 --- a/mappings/net/minecraft/text/EntityNbtDataSource.mapping +++ b/mappings/net/minecraft/text/EntityNbtDataSource.mapping @@ -1,6 +1,8 @@ CLASS net/minecraft/class_2576 net/minecraft/text/EntityNbtDataSource FIELD comp_735 rawSelector Ljava/lang/String; FIELD comp_736 selector Lnet/minecraft/class_2300; + FIELD field_46617 CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46618 TYPE Lnet/minecraft/class_7419$class_8827; METHOD (Ljava/lang/String;)V ARG 1 rawPath METHOD (Ljava/lang/String;Lnet/minecraft/class_2300;)V @@ -11,3 +13,5 @@ CLASS net/minecraft/class_2576 net/minecraft/text/EntityNbtDataSource ARG 1 o METHOD method_10923 parseSelector (Ljava/lang/String;)Lnet/minecraft/class_2300; ARG 0 rawSelector + METHOD method_54227 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance diff --git a/mappings/net/minecraft/text/HoverEvent.mapping b/mappings/net/minecraft/text/HoverEvent.mapping index a589c6b6e5..5fe44027c3 100644 --- a/mappings/net/minecraft/text/HoverEvent.mapping +++ b/mappings/net/minecraft/text/HoverEvent.mapping @@ -1,43 +1,114 @@ CLASS net/minecraft/class_2568 net/minecraft/text/HoverEvent + FIELD field_46601 CODEC Lcom/mojang/serialization/Codec; + FIELD field_46602 data Lnet/minecraft/class_2568$class_8826; METHOD (Lnet/minecraft/class_2568$class_5247;Ljava/lang/Object;)V ARG 1 action ARG 2 contents + METHOD (Lnet/minecraft/class_2568$class_8826;)V + ARG 1 data METHOD equals (Ljava/lang/Object;)Z ARG 1 o METHOD method_10891 getValue (Lnet/minecraft/class_2568$class_5247;)Ljava/lang/Object; ARG 1 action METHOD method_10892 getAction ()Lnet/minecraft/class_2568$class_5247; + METHOD method_54182 (Lcom/mojang/datafixers/util/Either;)Lnet/minecraft/class_2568; + ARG 0 either + METHOD method_54183 (Lnet/minecraft/class_2568$class_8826;)Lnet/minecraft/class_2568$class_8826; + ARG 0 data + METHOD method_54184 (Lnet/minecraft/class_2568;)Lcom/mojang/datafixers/util/Either; + ARG 0 event + METHOD method_54185 (Lnet/minecraft/class_2568$class_8826;)Lnet/minecraft/class_2568$class_8826; + ARG 0 data CLASS class_5247 Action FIELD field_24346 name Ljava/lang/String; FIELD field_24347 parsable Z + FIELD field_46603 UNVALIDATED_CODEC Lcom/mojang/serialization/Codec; + FIELD field_46604 CODEC Lcom/mojang/serialization/Codec; + FIELD field_46605 codec Lcom/mojang/serialization/Codec; + FIELD field_46606 legacyCodec Lcom/mojang/serialization/Codec; METHOD (Ljava/lang/String;ZLcom/mojang/serialization/Codec;Ljava/util/function/Function;)V ARG 1 name ARG 2 parsable - ARG 4 serializer + ARG 3 contentCodec + ARG 4 legacySerializer METHOD method_27667 isParsable ()Z METHOD method_27676 cast (Ljava/lang/Object;)Ljava/lang/Object; ARG 1 o + METHOD method_54186 validate (Lnet/minecraft/class_2568$class_5247;)Lcom/mojang/serialization/DataResult; + ARG 0 action + METHOD method_54187 (Lnet/minecraft/class_2568$class_8826;)Ljava/lang/Object; + ARG 0 action + METHOD method_54189 (Ljava/lang/Object;)Lnet/minecraft/class_2568$class_8826; + ARG 1 text + METHOD method_54191 (Ljava/lang/Object;)Lnet/minecraft/class_2568$class_8826; + ARG 1 content CLASS class_5248 EntityContent FIELD field_24351 entityType Lnet/minecraft/class_1299; FIELD field_24352 uuid Ljava/util/UUID; FIELD field_24353 name Ljava/util/Optional; FIELD field_24354 tooltip Ljava/util/List; + FIELD field_46607 CODEC Lcom/mojang/serialization/Codec; METHOD (Lnet/minecraft/class_1299;Ljava/util/UUID;Ljava/util/Optional;)V ARG 1 entityType ARG 2 uuid + ARG 3 name + METHOD (Lnet/minecraft/class_1299;Ljava/util/UUID;Lnet/minecraft/class_2561;)V + ARG 1 entityType + ARG 2 uuid + ARG 3 name METHOD equals (Ljava/lang/Object;)Z ARG 1 o METHOD method_27682 asTooltip ()Ljava/util/List; + METHOD method_54193 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance + METHOD method_54195 legacySerializer (Lnet/minecraft/class_2561;)Lcom/mojang/serialization/DataResult; + ARG 0 text + METHOD method_54196 (Lnet/minecraft/class_2568$class_5248;)Ljava/util/Optional; + ARG 0 content + METHOD method_54197 (Lnet/minecraft/class_2568$class_5248;)Ljava/util/UUID; + ARG 0 content + METHOD method_54198 (Lnet/minecraft/class_2568$class_5248;)Lnet/minecraft/class_1299; + ARG 0 content CLASS class_5249 ItemStackContent FIELD field_24355 item Lnet/minecraft/class_1792; FIELD field_24356 count I FIELD field_24357 nbt Ljava/util/Optional; FIELD field_24358 stack Lnet/minecraft/class_1799; + FIELD field_46608 ITEM_STACK_CODEC Lcom/mojang/serialization/Codec; + FIELD field_46609 CODEC Lcom/mojang/serialization/Codec; METHOD (Lnet/minecraft/class_1792;ILjava/util/Optional;)V ARG 1 item ARG 2 count + ARG 3 nbt + METHOD (Lnet/minecraft/class_1792;ILnet/minecraft/class_2487;)V + ARG 1 item + ARG 2 count + ARG 3 nbt METHOD (Lnet/minecraft/class_1799;)V ARG 1 stack METHOD equals (Ljava/lang/Object;)Z ARG 1 o METHOD method_27683 asStack ()Lnet/minecraft/class_1799; + METHOD method_54199 (Lnet/minecraft/class_1792;)Lnet/minecraft/class_2568$class_5249; + ARG 0 item + METHOD method_54201 (Lcom/mojang/datafixers/util/Either;)Lnet/minecraft/class_2568$class_5249; + ARG 0 either + METHOD method_54202 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance + METHOD method_54203 legacySerializer (Lnet/minecraft/class_2561;)Lcom/mojang/serialization/DataResult; + ARG 0 text + METHOD method_54204 (Lnet/minecraft/class_2568$class_5249;)Lnet/minecraft/class_2568$class_5249; + ARG 0 content + METHOD method_54205 (Lnet/minecraft/class_2568$class_5249;)Ljava/util/Optional; + ARG 0 content + METHOD method_54206 (Lnet/minecraft/class_2568$class_5249;)Ljava/lang/Integer; + ARG 0 content + METHOD method_54207 (Lnet/minecraft/class_2568$class_5249;)Lnet/minecraft/class_1792; + ARG 0 content + CLASS class_8826 EventData + FIELD field_46610 CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46611 LEGACY_CODEC Lcom/mojang/serialization/MapCodec; + METHOD method_54208 (Lnet/minecraft/class_2568$class_5247;)Lcom/mojang/serialization/Codec; + ARG 0 action + METHOD method_54209 (Lnet/minecraft/class_2568$class_5247;)Lcom/mojang/serialization/Codec; + ARG 0 action diff --git a/mappings/net/minecraft/text/KeybindTextContent.mapping b/mappings/net/minecraft/text/KeybindTextContent.mapping index a3be4046d9..c6c6ff0c2c 100644 --- a/mappings/net/minecraft/text/KeybindTextContent.mapping +++ b/mappings/net/minecraft/text/KeybindTextContent.mapping @@ -3,9 +3,15 @@ CLASS net/minecraft/class_2572 net/minecraft/text/KeybindTextContent COMMENT is not thread-safe. FIELD field_11767 key Ljava/lang/String; FIELD field_11768 translated Ljava/util/function/Supplier; + FIELD field_46619 CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46620 TYPE Lnet/minecraft/class_7417$class_8823; METHOD (Ljava/lang/String;)V ARG 1 key METHOD equals (Ljava/lang/Object;)Z ARG 1 o METHOD method_10901 getKey ()Ljava/lang/String; METHOD method_27691 getTranslated ()Lnet/minecraft/class_2561; + METHOD method_54228 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance + METHOD method_54229 (Lnet/minecraft/class_2572;)Ljava/lang/String; + ARG 0 content diff --git a/mappings/net/minecraft/text/NbtDataSource.mapping b/mappings/net/minecraft/text/NbtDataSource.mapping index 7113e26c8a..985fc780cc 100644 --- a/mappings/net/minecraft/text/NbtDataSource.mapping +++ b/mappings/net/minecraft/text/NbtDataSource.mapping @@ -1,4 +1,7 @@ CLASS net/minecraft/class_7419 net/minecraft/text/NbtDataSource COMMENT A data source for the NBT text content. Unmodifiable. + FIELD field_46616 CODEC Lcom/mojang/serialization/MapCodec; METHOD method_10916 get (Lnet/minecraft/class_2168;)Ljava/util/stream/Stream; ARG 1 source + METHOD method_54225 getType ()Lnet/minecraft/class_7419$class_8827; + CLASS class_8827 Type diff --git a/mappings/net/minecraft/text/NbtTextContent.mapping b/mappings/net/minecraft/text/NbtTextContent.mapping index 41f5c92c04..6aeb19f66a 100644 --- a/mappings/net/minecraft/text/NbtTextContent.mapping +++ b/mappings/net/minecraft/text/NbtTextContent.mapping @@ -5,6 +5,8 @@ CLASS net/minecraft/class_2574 net/minecraft/text/NbtTextContent FIELD field_11779 path Lnet/minecraft/class_2203$class_2209; FIELD field_33539 separator Ljava/util/Optional; FIELD field_39014 dataSource Lnet/minecraft/class_7419; + FIELD field_46621 CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46622 TYPE Lnet/minecraft/class_7417$class_8823; METHOD (Ljava/lang/String;Lnet/minecraft/class_2203$class_2209;ZLjava/util/Optional;Lnet/minecraft/class_7419;)V ARG 1 rawPath ARG 2 path @@ -36,3 +38,5 @@ CLASS net/minecraft/class_2574 net/minecraft/text/NbtTextContent ARG 2 current METHOD method_43484 getSeparator ()Ljava/util/Optional; METHOD method_43485 getDataSource ()Lnet/minecraft/class_7419; + METHOD method_54230 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance diff --git a/mappings/net/minecraft/text/PlainTextContent.mapping b/mappings/net/minecraft/text/PlainTextContent.mapping new file mode 100644 index 0000000000..2050dbc6a6 --- /dev/null +++ b/mappings/net/minecraft/text/PlainTextContent.mapping @@ -0,0 +1,13 @@ +CLASS net/minecraft/class_8828 net/minecraft/text/PlainTextContent + FIELD field_46623 CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46624 TYPE Lnet/minecraft/class_7417$class_8823; + FIELD field_46625 EMPTY Lnet/minecraft/class_8828; + METHOD comp_737 string ()Ljava/lang/String; + METHOD method_54231 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance + METHOD method_54232 of (Ljava/lang/String;)Lnet/minecraft/class_8828; + ARG 0 string + CLASS class_2585 Literal + FIELD comp_737 string Ljava/lang/String; + METHOD (Ljava/lang/String;)V + ARG 1 string diff --git a/mappings/net/minecraft/text/ScoreTextContent.mapping b/mappings/net/minecraft/text/ScoreTextContent.mapping index 29681674c4..aa92c0d4d6 100644 --- a/mappings/net/minecraft/text/ScoreTextContent.mapping +++ b/mappings/net/minecraft/text/ScoreTextContent.mapping @@ -3,6 +3,9 @@ CLASS net/minecraft/class_2578 net/minecraft/text/ScoreTextContent FIELD field_11786 selector Lnet/minecraft/class_2300; FIELD field_11787 name Ljava/lang/String; FIELD field_33290 SENDER_PLACEHOLDER Ljava/lang/String; + FIELD field_46626 INNER_CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46627 CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46628 TYPE Lnet/minecraft/class_7417$class_8823; METHOD (Ljava/lang/String;Ljava/lang/String;)V ARG 1 name ARG 2 objective @@ -18,3 +21,5 @@ CLASS net/minecraft/class_2578 net/minecraft/text/ScoreTextContent METHOD method_27701 parseEntitySelector (Ljava/lang/String;)Lnet/minecraft/class_2300; ARG 0 name METHOD method_36137 getSelector ()Lnet/minecraft/class_2300; + METHOD method_54233 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance diff --git a/mappings/net/minecraft/text/SelectorTextContent.mapping b/mappings/net/minecraft/text/SelectorTextContent.mapping index 5b65af2ecd..318823c7fa 100644 --- a/mappings/net/minecraft/text/SelectorTextContent.mapping +++ b/mappings/net/minecraft/text/SelectorTextContent.mapping @@ -3,6 +3,8 @@ CLASS net/minecraft/class_2579 net/minecraft/text/SelectorTextContent FIELD field_11790 selector Lnet/minecraft/class_2300; FIELD field_11791 LOGGER Lorg/slf4j/Logger; FIELD field_33540 separator Ljava/util/Optional; + FIELD field_46629 CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46630 TYPE Lnet/minecraft/class_7417$class_8823; METHOD (Ljava/lang/String;Ljava/util/Optional;)V ARG 1 pattern ARG 2 separator @@ -13,3 +15,5 @@ CLASS net/minecraft/class_2579 net/minecraft/text/SelectorTextContent METHOD method_36339 getSeparator ()Ljava/util/Optional; METHOD method_43486 readSelector (Ljava/lang/String;)Lnet/minecraft/class_2300; ARG 0 pattern + METHOD method_54234 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance diff --git a/mappings/net/minecraft/text/StorageNbtDataSource.mapping b/mappings/net/minecraft/text/StorageNbtDataSource.mapping index 1390ea4f91..f953c085ed 100644 --- a/mappings/net/minecraft/text/StorageNbtDataSource.mapping +++ b/mappings/net/minecraft/text/StorageNbtDataSource.mapping @@ -1 +1,5 @@ CLASS net/minecraft/class_4616 net/minecraft/text/StorageNbtDataSource + FIELD field_46631 CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46632 TYPE Lnet/minecraft/class_7419$class_8827; + METHOD method_54235 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance diff --git a/mappings/net/minecraft/text/Style.mapping b/mappings/net/minecraft/text/Style.mapping index ed8b72d09c..e1972187fa 100644 --- a/mappings/net/minecraft/text/Style.mapping +++ b/mappings/net/minecraft/text/Style.mapping @@ -150,8 +150,36 @@ CLASS net/minecraft/class_2583 net/minecraft/text/Style ARG 3 underlined ARG 4 strikethrough ARG 5 obfuscated - CLASS class_2584 Serializer - COMMENT A JSON serializer for {@link Style}. + METHOD method_54210 with (Lnet/minecraft/class_2583;Ljava/lang/Object;Ljava/lang/Object;)Lnet/minecraft/class_2583; + ARG 0 newStyle + ARG 1 oldAttribute + ARG 2 newAttribute + CLASS class_2584 Codecs + COMMENT Contains codecs to serialize {@link Style}s. + FIELD field_46612 MAP_CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46613 CODEC Lcom/mojang/serialization/Codec; + METHOD method_54211 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance + METHOD method_54212 (Lnet/minecraft/class_2583;)Ljava/util/Optional; + ARG 0 style + METHOD method_54213 (Lnet/minecraft/class_2583;)Ljava/util/Optional; + ARG 0 style + METHOD method_54214 (Lnet/minecraft/class_2583;)Ljava/util/Optional; + ARG 0 style + METHOD method_54215 (Lnet/minecraft/class_2583;)Ljava/util/Optional; + ARG 0 style + METHOD method_54216 (Lnet/minecraft/class_2583;)Ljava/util/Optional; + ARG 0 style + METHOD method_54217 (Lnet/minecraft/class_2583;)Ljava/util/Optional; + ARG 0 style + METHOD method_54218 (Lnet/minecraft/class_2583;)Ljava/util/Optional; + ARG 0 style + METHOD method_54219 (Lnet/minecraft/class_2583;)Ljava/util/Optional; + ARG 0 style + METHOD method_54220 (Lnet/minecraft/class_2583;)Ljava/util/Optional; + ARG 0 style + METHOD method_54221 (Lnet/minecraft/class_2583;)Ljava/util/Optional; + ARG 0 style CLASS class_7418 Writer FIELD field_39012 shouldAppendComma Z METHOD method_43478 appendComma ()V diff --git a/mappings/net/minecraft/text/Text.mapping b/mappings/net/minecraft/text/Text.mapping index 0e76c3ecca..fe8bd8ed33 100644 --- a/mappings/net/minecraft/text/Text.mapping +++ b/mappings/net/minecraft/text/Text.mapping @@ -49,6 +49,12 @@ CLASS net/minecraft/class_2561 net/minecraft/text/Text ARG 2 separator ARG 3 dataSource METHOD method_43469 translatable (Ljava/lang/String;[Ljava/lang/Object;)Lnet/minecraft/class_5250; + COMMENT {@return a translatable text with arguments} + COMMENT + COMMENT

The arguments passed must be either numbers, booleans, strings, or another + COMMENT {@link Text}. Use {@link #stringifiedTranslatable} to construct texts with + COMMENT other objects as arguments. Alternatively, convert them using static methods here + COMMENT like {@link #of(Identifier)}. ARG 0 key ARG 1 args METHOD method_43470 literal (Ljava/lang/String;)Lnet/minecraft/class_5250; @@ -69,22 +75,77 @@ CLASS net/minecraft/class_2561 net/minecraft/text/Text ARG 0 key ARG 1 fallback ARG 2 args - CLASS class_2562 Serializer - COMMENT A JSON serializer for {@link Text}. + METHOD method_54154 of (Lnet/minecraft/class_2960;)Lnet/minecraft/class_2561; + COMMENT {@return a text representing {@code id}} + COMMENT + COMMENT

The returned text has the format {@code namespace:path}. + COMMENT Namespace is always included. + ARG 0 id + METHOD method_54155 of (Lcom/mojang/brigadier/Message;)Lnet/minecraft/class_2561; + COMMENT {@return a text with {@code message}} + COMMENT + COMMENT

If a text instance is passed, this method returns {@code message} itself; + COMMENT otherwise this creates a new literal text with the message content. + ARG 0 message + METHOD method_54156 of (Lnet/minecraft/class_1923;)Lnet/minecraft/class_2561; + COMMENT {@return a text representing chunk {@code pos}} + COMMENT + COMMENT

The returned text has the format {@code [X, Z]}. + ARG 0 pos + METHOD method_54157 of (Ljava/util/Date;)Lnet/minecraft/class_2561; + COMMENT {@return a {@linkplain #literal literal} text representing {@code date}} + COMMENT + COMMENT @implNote The date is converted to a string using {@link Date#toString}. + COMMENT Notably, it does not localize the date format. + ARG 0 date + METHOD method_54158 of (Ljava/util/UUID;)Lnet/minecraft/class_2561; + COMMENT {@return a text representing {@code uuid}} + COMMENT + COMMENT

The UUID is converted to a string like {@code 12345678-90AB-CDEF-1234-567890ABCDEF}. + COMMENT + COMMENT @see UUID#toString + ARG 0 uuid + METHOD method_54159 stringifiedTranslatable (Ljava/lang/String;[Ljava/lang/Object;)Lnet/minecraft/class_5250; + COMMENT {@return a translatable text with arguments} + COMMENT + COMMENT

Arguments that are not numbers, booleans, strings, or another {@link Text} are + COMMENT converted to strings using {@link String#valueOf(Object)}. + ARG 0 key + ARG 1 args + METHOD method_54160 getLiteralString ()Ljava/lang/String; + COMMENT {@return the string of the literal text, or {@code null} if this text is not + COMMENT a literal} + COMMENT + COMMENT

A literal text is an unstyled {@link PlainTextContent} without any siblings. + COMMENT Such texts are serialized as a string instead of an object. + CLASS class_2562 Serialization FIELD field_11752 JSON_READER_LINE_START Ljava/lang/reflect/Field; FIELD field_11753 JSON_READER_POS Ljava/lang/reflect/Field; FIELD field_11754 GSON Lcom/google/gson/Gson; - METHOD method_10867 toJson (Lnet/minecraft/class_2561;)Ljava/lang/String; + METHOD method_10867 toJsonString (Lnet/minecraft/class_2561;)Ljava/lang/String; ARG 0 text METHOD method_10868 toJsonTree (Lnet/minecraft/class_2561;)Lcom/google/gson/JsonElement; ARG 0 text - METHOD method_10872 fromJson (Lcom/google/gson/JsonElement;)Lnet/minecraft/class_5250; + METHOD method_10871 fromJson (Lcom/google/gson/JsonElement;)Lnet/minecraft/class_5250; + ARG 0 json + METHOD method_10872 fromJsonTree (Lcom/google/gson/JsonElement;)Lnet/minecraft/class_5250; ARG 0 json METHOD method_10873 fromLenientJson (Ljava/lang/String;)Lnet/minecraft/class_5250; ARG 0 json + METHOD method_10874 toJson (Lnet/minecraft/class_2561;)Lcom/google/gson/JsonElement; + ARG 0 text METHOD method_10877 fromJson (Ljava/lang/String;)Lnet/minecraft/class_5250; ARG 0 json METHOD method_10879 fromJson (Lcom/mojang/brigadier/StringReader;)Lnet/minecraft/class_5250; ARG 0 reader METHOD method_10880 getPosition (Lcom/google/gson/stream/JsonReader;)I ARG 0 reader + CLASS class_8822 Serializer + METHOD deserialize (Lcom/google/gson/JsonElement;Ljava/lang/reflect/Type;Lcom/google/gson/JsonDeserializationContext;)Ljava/lang/Object; + ARG 1 json + ARG 2 type + ARG 3 context + METHOD serialize (Ljava/lang/Object;Ljava/lang/reflect/Type;Lcom/google/gson/JsonSerializationContext;)Lcom/google/gson/JsonElement; + ARG 1 text + ARG 2 type + ARG 3 context diff --git a/mappings/net/minecraft/text/TextCodecs.mapping b/mappings/net/minecraft/text/TextCodecs.mapping new file mode 100644 index 0000000000..0d595d7ac9 --- /dev/null +++ b/mappings/net/minecraft/text/TextCodecs.mapping @@ -0,0 +1,52 @@ +CLASS net/minecraft/class_8824 net/minecraft/text/TextCodecs + FIELD field_46597 CODEC Lcom/mojang/serialization/Codec; + FIELD field_46598 STRINGIFIED_CODEC Lcom/mojang/serialization/Codec; + METHOD method_54164 (Lcom/google/gson/JsonElement;)Lcom/mojang/serialization/DataResult; + ARG 0 json + METHOD method_54165 (Lcom/mojang/datafixers/util/Either;)Lnet/minecraft/class_2561; + ARG 0 either + METHOD method_54166 createCodec (Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec; + ARG 0 selfCodec + METHOD method_54167 (Lcom/mojang/serialization/MapCodec;Lcom/mojang/serialization/Codec;Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 2 instance + METHOD method_54168 (Ljava/lang/Object;)Ljava/lang/Object; + ARG 0 object + METHOD method_54169 combine (Ljava/util/List;)Lnet/minecraft/class_5250; + ARG 0 texts + METHOD method_54170 (Ljava/util/function/Function;Lnet/minecraft/class_3542;)Lcom/mojang/serialization/Codec; + ARG 1 type + METHOD method_54171 (Ljava/util/function/Function;Ljava/util/function/Function;Ljava/lang/Object;)Lcom/mojang/serialization/MapEncoder; + ARG 2 object + METHOD method_54172 (Lnet/minecraft/class_2561;)Lcom/mojang/datafixers/util/Either; + ARG 0 text + METHOD method_54174 dispatchingCodec ([Lnet/minecraft/class_3542;Ljava/util/function/Function;Ljava/util/function/Function;)Lcom/mojang/serialization/MapCodec; + ARG 0 types + ARG 1 codecGetter + ARG 2 typeGetter + METHOD method_54175 (Lcom/mojang/datafixers/util/Either;)Lnet/minecraft/class_2561; + ARG 0 either2 + METHOD method_54176 (Ljava/lang/Object;)Ljava/lang/Object; + ARG 0 object + METHOD method_54177 (Lnet/minecraft/class_2561;)Lnet/minecraft/class_2561; + ARG 0 text + METHOD method_54178 (Lcom/mojang/datafixers/util/Either;)Ljava/lang/Object; + ARG 0 either + METHOD method_54179 (Lnet/minecraft/class_2561;)Lcom/mojang/serialization/DataResult; + ARG 0 text + CLASS class_8825 FuzzyCodec + FIELD field_46599 codecs Ljava/util/List; + FIELD field_46600 codecGetter Ljava/util/function/Function; + METHOD (Ljava/util/List;Ljava/util/function/Function;)V + ARG 1 codecs + ARG 2 codecGetter + METHOD decode (Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/MapLike;)Lcom/mojang/serialization/DataResult; + ARG 1 ops + ARG 2 input + METHOD encode (Ljava/lang/Object;Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/RecordBuilder;)Lcom/mojang/serialization/RecordBuilder; + ARG 1 input + ARG 2 ops + ARG 3 prefix + METHOD keys (Lcom/mojang/serialization/DynamicOps;)Ljava/util/stream/Stream; + ARG 1 ops + METHOD method_54181 (Lcom/mojang/serialization/DynamicOps;Lcom/mojang/serialization/MapCodec;)Ljava/util/stream/Stream; + ARG 1 codec diff --git a/mappings/net/minecraft/text/TextContent.mapping b/mappings/net/minecraft/text/TextContent.mapping index 2d3e4774e1..614f0f391b 100644 --- a/mappings/net/minecraft/text/TextContent.mapping +++ b/mappings/net/minecraft/text/TextContent.mapping @@ -24,3 +24,5 @@ CLASS net/minecraft/class_7417 net/minecraft/text/TextContent COMMENT @see Text#visit(StringVisitable.StyledVisitor, Style) ARG 1 visitor ARG 2 style + METHOD method_54163 getType ()Lnet/minecraft/class_7417$class_8823; + CLASS class_8823 Type diff --git a/mappings/net/minecraft/text/TranslatableTextContent.mapping b/mappings/net/minecraft/text/TranslatableTextContent.mapping index 76a911c919..1f334b41a6 100644 --- a/mappings/net/minecraft/text/TranslatableTextContent.mapping +++ b/mappings/net/minecraft/text/TranslatableTextContent.mapping @@ -8,6 +8,10 @@ CLASS net/minecraft/class_2588 net/minecraft/text/TranslatableTextContent FIELD field_24369 NULL_ARGUMENT Lnet/minecraft/class_5348; FIELD field_25317 languageCache Lnet/minecraft/class_2477; FIELD field_41875 fallback Ljava/lang/String; + FIELD field_46633 CODEC Lcom/mojang/serialization/MapCodec; + FIELD field_46634 TYPE Lnet/minecraft/class_7417$class_8823; + FIELD field_46635 OBJECT_ARGUMENT_CODEC Lcom/mojang/serialization/Codec; + FIELD field_46636 ARGUMENT_CODEC Lcom/mojang/serialization/Codec; METHOD (Ljava/lang/String;Ljava/lang/String;[Ljava/lang/Object;)V ARG 1 key ARG 2 fallback @@ -23,3 +27,37 @@ CLASS net/minecraft/class_2588 net/minecraft/text/TranslatableTextContent METHOD method_29434 getArg (I)Lnet/minecraft/class_5348; ARG 1 index METHOD method_48323 getFallback ()Ljava/lang/String; + METHOD method_54236 (Lcom/mojang/datafixers/util/Either;)Ljava/lang/Object; + ARG 0 either + METHOD method_54237 (Lcom/mojang/serialization/codecs/RecordCodecBuilder$Instance;)Lcom/mojang/datafixers/kinds/App; + ARG 0 instance + METHOD method_54238 isPrimitive (Ljava/lang/Object;)Z + COMMENT {@return whether {@code argument} is primitive} + COMMENT + COMMENT

Primitives include numbers, booleans, and strings. These (along with {@code Text}) + COMMENT can be used as translatable text arguments; others need to be converted first. + ARG 0 argument + METHOD method_54239 of (Ljava/lang/String;Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/class_2588; + ARG 0 key + ARG 1 fallback + ARG 2 args + METHOD method_54240 (Ljava/util/List;)[Ljava/lang/Object; + ARG 0 list + METHOD method_54241 toArray (Ljava/util/Optional;)[Ljava/lang/Object; + ARG 0 args + METHOD method_54242 (Lnet/minecraft/class_2561;)Ljava/lang/Object; + ARG 0 text + METHOD method_54243 (Lnet/minecraft/class_2588;)Ljava/util/Optional; + ARG 0 content + METHOD method_54244 toOptionalList ([Ljava/lang/Object;)Ljava/util/Optional; + ARG 0 args + METHOD method_54245 validate (Ljava/lang/Object;)Lcom/mojang/serialization/DataResult; + ARG 0 object + METHOD method_54246 (Lnet/minecraft/class_2588;)Ljava/util/Optional; + ARG 0 content + METHOD method_54247 (Ljava/lang/Object;)Lcom/mojang/datafixers/util/Either; + ARG 0 argument + METHOD method_54248 (Lnet/minecraft/class_2588;)Ljava/lang/String; + ARG 0 content + METHOD method_54249 (Ljava/lang/Object;)Ljava/lang/Object; + ARG 0 object