From da2b442a92105883b33ff66c944b91b02268d852 Mon Sep 17 00:00:00 2001 From: liach <7806504+liach@users.noreply.github.com> Date: Mon, 31 May 2021 11:19:24 -0500 Subject: [PATCH] Some required tag details (#2442) * Some required tag details Signed-off-by: liach * Forgot removing capitalizating when adding "Creates and" Co-authored-by: YanisBft Co-authored-by: liach Co-authored-by: YanisBft --- .../net/minecraft/tag/RequiredTagList.mapping | 5 +++- .../tag/RequiredTagListRegistry.mapping | 25 ++++++++++++++++--- 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/mappings/net/minecraft/tag/RequiredTagList.mapping b/mappings/net/minecraft/tag/RequiredTagList.mapping index 170563cae0..49d9cbf8b0 100644 --- a/mappings/net/minecraft/tag/RequiredTagList.mapping +++ b/mappings/net/minecraft/tag/RequiredTagList.mapping @@ -1,5 +1,7 @@ CLASS net/minecraft/class_5120 net/minecraft/tag/RequiredTagList - COMMENT Stores all required tags of a given type, so they can be updated to point to the new tag instances on datapack reload + COMMENT Stores all required tags of a given type, so they can be updated to point to the new tag instances on datapack reload. + COMMENT + COMMENT

The propagation of data pack reload is done by {@link RequiredTagListRegistry}. FIELD field_23682 group Lnet/minecraft/class_5414; FIELD field_23683 tags Ljava/util/List; FIELD field_28301 registryKey Lnet/minecraft/class_5321; @@ -25,6 +27,7 @@ CLASS net/minecraft/class_5120 net/minecraft/tag/RequiredTagList METHOD method_33147 addToManager (Lnet/minecraft/class_5415$class_5749;)V ARG 1 manager METHOD method_33148 getRegistryKey ()Lnet/minecraft/class_5321; + COMMENT {@return the registry key representing the type of object in this list} METHOD method_33149 getDataType ()Ljava/lang/String; CLASS class_5121 TagWrapper FIELD field_23684 id Lnet/minecraft/class_2960; diff --git a/mappings/net/minecraft/tag/RequiredTagListRegistry.mapping b/mappings/net/minecraft/tag/RequiredTagListRegistry.mapping index 6e9524678f..54174f5602 100644 --- a/mappings/net/minecraft/tag/RequiredTagListRegistry.mapping +++ b/mappings/net/minecraft/tag/RequiredTagListRegistry.mapping @@ -1,17 +1,36 @@ CLASS net/minecraft/class_5413 net/minecraft/tag/RequiredTagListRegistry - FIELD field_25741 REQUIRED_TAG_LISTS Ljava/util/List; - FIELD field_28303 REGISTRY_KEYS Ljava/util/Set; + FIELD field_25741 ALL Ljava/util/List; + FIELD field_28303 REQUIRED_LIST_KEYS Ljava/util/Set; METHOD method_30196 clearAllTags ()V METHOD method_30198 updateTagManager (Lnet/minecraft/class_5415;)V ARG 0 tagManager METHOD method_30199 (Lnet/minecraft/class_5415;Lnet/minecraft/class_5120;)V ARG 1 list + METHOD method_30200 (Lcom/google/common/collect/Multimap;Lnet/minecraft/class_5415;Lnet/minecraft/class_5120;)V + ARG 2 list METHOD method_30201 register (Lnet/minecraft/class_5321;Ljava/lang/String;)Lnet/minecraft/class_5120; + COMMENT Creates and registers a required tag list. + COMMENT + COMMENT

The registered tag must be in the set returned by {@link #getBuiltinTags()}, + COMMENT or the registry will fail {@linkplain #validate() validation}. + COMMENT + COMMENT @return the created and registered list + COMMENT @throws IllegalStateException if there is a list with a duplicate {@code registryKey} ARG 0 registryKey + COMMENT the key representing the element type of the tags ARG 1 dataType + COMMENT the data type, or ID's path prefix, for the tag JSONs in the data pack METHOD method_30202 validateRegistrations ()V METHOD method_30203 getMissingTags (Lnet/minecraft/class_5415;)Lcom/google/common/collect/Multimap; ARG 0 tagManager + METHOD method_33150 (Lnet/minecraft/class_5415$class_5749;Lnet/minecraft/class_5120;)V + ARG 1 list METHOD method_33151 forEach (Ljava/util/function/Consumer;)V ARG 0 consumer - METHOD method_33153 getRequiredTags ()Ljava/util/Set; + METHOD method_33152 createBuiltinTagManager ()Lnet/minecraft/class_5415; + METHOD method_33153 getBuiltinTags ()Ljava/util/Set; + METHOD method_33154 validate ()V + COMMENT Ensures that each key in {@link #REQUIRED_LIST_KEYS} have a corresponding list + COMMENT in the return value of {@link #getBuiltinTags()}. + COMMENT + COMMENT @throws IllegalStateException when the validation fails