Package net.minecraft.command
Class CommandRegistryAccess
java.lang.Object
net.minecraft.command.CommandRegistryAccess
A class that creates
CommandRegistryWrapper with ability to set a policy on
how to handle unrecognized tags.- API Note:
- You usually do not need to create your own instance; the command registration
callbacks (such as
CommandManagerconstructor) provides an instance with proper configurations. - Mappings:
Namespace Name official dlintermediary net/minecraft/class_7157named net/minecraft/command/CommandRegistryAccess
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA policy on how to handle aTagKeythat does not resolve to an existing tag (unrecognized tag) inCommandRegistryWrapper.getEntryList(net.minecraft.tag.TagKey<T>). -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DynamicRegistryManager(package private) CommandRegistryAccess.EntryListCreationPolicy -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> CommandRegistryWrapper<T>createWrapper(RegistryKey<? extends Registry<T>> registryRef) Creates a registry wrapper that follows the entry list creation policy.voidsetEntryListCreationPolicy(CommandRegistryAccess.EntryListCreationPolicy entryListCreationPolicy) Sets the policy on how to handle unrecognized tags.
-
Field Details
-
dynamicRegistryManager
- Mappings:
Namespace Name Mixin selector official aLdl;a:Lhn;intermediary field_37820Lnet/minecraft/class_7157;field_37820:Lnet/minecraft/class_5455;named dynamicRegistryManagerLnet/minecraft/command/CommandRegistryAccess;dynamicRegistryManager:Lnet/minecraft/util/registry/DynamicRegistryManager;
-
entryListCreationPolicy
CommandRegistryAccess.EntryListCreationPolicy entryListCreationPolicy- Mappings:
Namespace Name Mixin selector official bLdl;b:Ldl$a;intermediary field_37821Lnet/minecraft/class_7157;field_37821:Lnet/minecraft/class_7157$class_7158;named entryListCreationPolicyLnet/minecraft/command/CommandRegistryAccess;entryListCreationPolicy:Lnet/minecraft/command/CommandRegistryAccess$EntryListCreationPolicy;
-
-
Constructor Details
-
CommandRegistryAccess
- Mappings:
Namespace Name Mixin selector official <init>Ldl;<init>(Lhn;)Vintermediary <init>Lnet/minecraft/class_7157;<init>(Lnet/minecraft/class_5455;)Vnamed <init>Lnet/minecraft/command/CommandRegistryAccess;<init>(Lnet/minecraft/util/registry/DynamicRegistryManager;)V
-
-
Method Details
-
setEntryListCreationPolicy
public void setEntryListCreationPolicy(CommandRegistryAccess.EntryListCreationPolicy entryListCreationPolicy) Sets the policy on how to handle unrecognized tags.See
CommandRegistryAccess.EntryListCreationPolicyfor the description of each policy.- Mappings:
Namespace Name Mixin selector official aLdl;a(Ldl$a;)Vintermediary method_41698Lnet/minecraft/class_7157;method_41698(Lnet/minecraft/class_7157$class_7158;)Vnamed setEntryListCreationPolicyLnet/minecraft/command/CommandRegistryAccess;setEntryListCreationPolicy(Lnet/minecraft/command/CommandRegistryAccess$EntryListCreationPolicy;)V
-
createWrapper
Creates a registry wrapper that follows the entry list creation policy.- Parameters:
registryRef- the registry key of the registry to wrap- Mappings:
Namespace Name Mixin selector official aLdl;a(Laai;)Lhd;intermediary method_41699Lnet/minecraft/class_7157;method_41699(Lnet/minecraft/class_5321;)Lnet/minecraft/class_7225;named createWrapperLnet/minecraft/command/CommandRegistryAccess;createWrapper(Lnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/command/CommandRegistryWrapper;
-