Class CommandRegistryAccess

java.lang.Object
net.minecraft.command.CommandRegistryAccess

public final class CommandRegistryAccess extends Object
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
  • Field Details

    • dynamicRegistryManager

      private final DynamicRegistryManager 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

      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

      public CommandRegistryAccess(DynamicRegistryManager dynamicRegistryManager)
      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

      public <T> CommandRegistryWrapper<T> createWrapper(RegistryKey<? extends Registry<T>> registryRef)
      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(Laba;)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;