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
CommandManager
constructor) provides an instance with proper configurations. - Mappings:
Namespace Name official dl
intermediary net/minecraft/class_7157
named net/minecraft/command/CommandRegistryAccess
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
A policy on how to handle aTagKey
that does not resolve to an existing tag (unrecognized tag) inCommandRegistryWrapper.getEntryList(net.minecraft.tag.TagKey<T>)
. -
Field Summary
Modifier and TypeFieldDescriptionprivate final DynamicRegistryManager
(package private) CommandRegistryAccess.EntryListCreationPolicy
-
Constructor Summary
-
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.void
setEntryListCreationPolicy
(CommandRegistryAccess.EntryListCreationPolicy entryListCreationPolicy) Sets the policy on how to handle unrecognized tags.
-
Field Details
-
dynamicRegistryManager
- Mappings:
Namespace Name Mixin selector official a
Ldl;a:Lhn;
intermediary field_37820
Lnet/minecraft/class_7157;field_37820:Lnet/minecraft/class_5455;
named dynamicRegistryManager
Lnet/minecraft/command/CommandRegistryAccess;dynamicRegistryManager:Lnet/minecraft/util/registry/DynamicRegistryManager;
-
entryListCreationPolicy
CommandRegistryAccess.EntryListCreationPolicy entryListCreationPolicy- Mappings:
Namespace Name Mixin selector official b
Ldl;b:Ldl$a;
intermediary field_37821
Lnet/minecraft/class_7157;field_37821:Lnet/minecraft/class_7157$class_7158;
named entryListCreationPolicy
Lnet/minecraft/command/CommandRegistryAccess;entryListCreationPolicy:Lnet/minecraft/command/CommandRegistryAccess$EntryListCreationPolicy;
-
-
Constructor Details
-
CommandRegistryAccess
- Mappings:
Namespace Name Mixin selector official <init>
Ldl;<init>(Lhn;)V
intermediary <init>
Lnet/minecraft/class_7157;<init>(Lnet/minecraft/class_5455;)V
named <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.EntryListCreationPolicy
for the description of each policy.- Mappings:
Namespace Name Mixin selector official a
Ldl;a(Ldl$a;)V
intermediary method_41698
Lnet/minecraft/class_7157;method_41698(Lnet/minecraft/class_7157$class_7158;)V
named setEntryListCreationPolicy
Lnet/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 a
Ldl;a(Laai;)Lhd;
intermediary method_41699
Lnet/minecraft/class_7157;method_41699(Lnet/minecraft/class_5321;)Lnet/minecraft/class_7225;
named createWrapper
Lnet/minecraft/command/CommandRegistryAccess;createWrapper(Lnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/command/CommandRegistryWrapper;
-