mirror of https://github.com/FabricMC/yarn.git
22w11a registry (#3046)
* 22w11a registry * Map registry stuff * Rename and move classes * Add javadoc
This commit is contained in:
parent
a98e8513e9
commit
eab2a53ed9
|
@ -0,0 +1,30 @@
|
|||
CLASS net/minecraft/class_7157 net/minecraft/command/CommandRegistryAccess
|
||||
COMMENT A class that creates {@link CommandRegistryWrapper} with ability to set a policy on
|
||||
COMMENT how to handle unrecognized tags.
|
||||
COMMENT
|
||||
COMMENT @apiNote You usually do not need to create your own instance; the command registration
|
||||
COMMENT callbacks (such as {@link net.minecraft.server.command.CommandManager} constructor)
|
||||
COMMENT provides an instance with proper configurations.
|
||||
FIELD field_37820 dynamicRegistryManager Lnet/minecraft/class_5455;
|
||||
FIELD field_37821 entryListCreationPolicy Lnet/minecraft/class_7157$class_7158;
|
||||
METHOD <init> (Lnet/minecraft/class_5455;)V
|
||||
ARG 1 dynamicRegistryManager
|
||||
METHOD method_41698 setEntryListCreationPolicy (Lnet/minecraft/class_7157$class_7158;)V
|
||||
COMMENT Sets the policy on how to handle unrecognized tags.
|
||||
COMMENT
|
||||
COMMENT <p>See {@link CommandRegistryAccess.EntryListCreationPolicy} for the description of
|
||||
COMMENT each policy.
|
||||
ARG 1 entryListCreationPolicy
|
||||
METHOD method_41699 createWrapper (Lnet/minecraft/class_5321;)Lnet/minecraft/class_7225;
|
||||
COMMENT Creates a registry wrapper that follows the entry list creation policy.
|
||||
ARG 1 registryRef
|
||||
COMMENT the registry key of the registry to wrap
|
||||
CLASS class_7158 EntryListCreationPolicy
|
||||
COMMENT A policy on how to handle a {@link TagKey} that does not resolve to an existing
|
||||
COMMENT tag (unrecognized tag) in {@link CommandRegistryWrapper#getEntryList}.
|
||||
FIELD field_37824 Lnet/minecraft/class_7157$class_7158;
|
||||
COMMENT Creates a new {@link RegistryEntryList}, stores it and returns it.
|
||||
FIELD field_37825 Lnet/minecraft/class_7157$class_7158;
|
||||
COMMENT Returns a new, empty {@link RegistryEntryList} every time.
|
||||
FIELD field_37826 Lnet/minecraft/class_7157$class_7158;
|
||||
COMMENT Returns {@link Optional.empty()}.
|
|
@ -0,0 +1,37 @@
|
|||
CLASS net/minecraft/class_7225 net/minecraft/command/CommandRegistryWrapper
|
||||
COMMENT A wrapper of a registry, used in command arguments.
|
||||
COMMENT
|
||||
COMMENT <p>The methods in this class in most cases perform the same as ones defined
|
||||
COMMENT in {@link Registry}. However, subclasses may have slightly different behaviors
|
||||
COMMENT to make it easier to handle user-passed arguments. For example, {@link #getEntryList(TagKey)}
|
||||
COMMENT may return an empty {@link RegistryEntryList} instead of {@link Optional.empty()}.
|
||||
COMMENT
|
||||
COMMENT <p>A wrapper without any special behaviors can be created by calling {#link of(Registry)}.
|
||||
METHOD method_41700 getEntryList (Lnet/minecraft/class_6862;)Ljava/util/Optional;
|
||||
COMMENT {@return the entry list for the provided tag}
|
||||
COMMENT
|
||||
COMMENT <p>Implementations have different behaviors for unrecognized tags. The
|
||||
COMMENT {@linkplain CommandRegistryWrapper.Impl#getEntryList default implementation}
|
||||
COMMENT returns {@link Optional.empty()}; however, the ones created by
|
||||
COMMENT {@link CommandRegistryAccess#createWrapper} can create and return a new entry list, or
|
||||
COMMENT return an empty entry list.
|
||||
COMMENT
|
||||
COMMENT @see Registry#getEntryList
|
||||
COMMENT @see CommandRegistryAccess.EntryListCreationPolicy
|
||||
ARG 1 tag
|
||||
METHOD method_42017 streamKeys ()Ljava/util/stream/Stream;
|
||||
COMMENT {@return a stream of registry keys defined in the wrapped registry}
|
||||
COMMENT
|
||||
COMMENT @see Registry#getKeys
|
||||
METHOD method_42018 of (Lnet/minecraft/class_2378;)Lnet/minecraft/class_7225;
|
||||
COMMENT {@return a new wrapper for the {@code registry} without any special behaviors}
|
||||
ARG 0 registry
|
||||
METHOD method_42019 getEntry (Lnet/minecraft/class_5321;)Ljava/util/Optional;
|
||||
COMMENT @see Registry#getEntry
|
||||
ARG 1 key
|
||||
METHOD method_42020 streamTags ()Ljava/util/stream/Stream;
|
||||
COMMENT @see Registry#streamTags
|
||||
CLASS class_7226 Impl
|
||||
FIELD field_37996 registry Lnet/minecraft/class_2378;
|
||||
METHOD <init> (Lnet/minecraft/class_2378;)V
|
||||
ARG 1 registry
|
|
@ -55,7 +55,7 @@ CLASS net/minecraft/class_5458 net/minecraft/util/registry/BuiltinRegistries
|
|||
ARG 0 registry
|
||||
ARG 1 key
|
||||
ARG 2 object
|
||||
METHOD method_40360 (Lnet/minecraft/class_2378;Ljava/lang/String;Ljava/lang/Object;)Lnet/minecraft/class_6880;
|
||||
METHOD method_40360 addCasted (Lnet/minecraft/class_2378;Ljava/lang/String;Ljava/lang/Object;)Lnet/minecraft/class_6880;
|
||||
ARG 0 registry
|
||||
ARG 1 id
|
||||
ARG 2 value
|
||||
|
|
|
@ -57,3 +57,4 @@ CLASS net/minecraft/class_5321 net/minecraft/util/registry/RegistryKey
|
|||
COMMENT @apiNote This can be used to safely cast an unknown key to {@code RegistryKey<E>}
|
||||
COMMENT by passing the registry {@code E}.
|
||||
ARG 1 registryRef
|
||||
METHOD method_41185 getRegistry ()Lnet/minecraft/class_2960;
|
||||
|
|
Loading…
Reference in New Issue