Skip to content

Commit

Permalink
Some required tag details (FabricMC#2442)
Browse files Browse the repository at this point in the history
* Some required tag details

Signed-off-by: liach <[email protected]>

* Forgot removing capitalizating when adding "Creates and"

Co-authored-by: YanisBft <[email protected]>

Co-authored-by: liach <[email protected]>
Co-authored-by: YanisBft <[email protected]>
  • Loading branch information
3 people authored May 31, 2021
1 parent 6ad6ee9 commit da2b442
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
5 changes: 4 additions & 1 deletion mappings/net/minecraft/tag/RequiredTagList.mapping
Original file line number Diff line number Diff line change
@@ -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 <p>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;
Expand All @@ -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;
Expand Down
25 changes: 22 additions & 3 deletions mappings/net/minecraft/tag/RequiredTagListRegistry.mapping
Original file line number Diff line number Diff line change
@@ -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 <p>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

0 comments on commit da2b442

Please sign in to comment.