Class CommandRegistryWrapper.Impl<T>

java.lang.Object
net.minecraft.command.CommandRegistryWrapper.Impl<T>
All Implemented Interfaces:
CommandRegistryWrapper<T>
Enclosing interface:
CommandRegistryWrapper<T>

public static class CommandRegistryWrapper.Impl<T> extends Object implements CommandRegistryWrapper<T>
Mappings:
Namespace Name
official hb$a
intermediary net/minecraft/class_7225$class_7226
named net/minecraft/command/CommandRegistryWrapper$Impl
  • Field Details

    • registry

      protected final Registry<T> registry
      Mappings:
      Namespace Name Mixin selector
      official b Lhb$a;b:Lhl;
      intermediary field_37996 Lnet/minecraft/class_7225$class_7226;field_37996:Lnet/minecraft/class_2378;
      named registry Lnet/minecraft/command/CommandRegistryWrapper$Impl;registry:Lnet/minecraft/util/registry/Registry;
  • Constructor Details

    • Impl

      public Impl(Registry<T> registry)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lhb$a;<init>(Lhl;)V
      intermediary <init> Lnet/minecraft/class_7225$class_7226;<init>(Lnet/minecraft/class_2378;)V
      named <init> Lnet/minecraft/command/CommandRegistryWrapper$Impl;<init>(Lnet/minecraft/util/registry/Registry;)V
  • Method Details

    • getEntry

      public Optional<RegistryEntry.Reference<T>> getEntry(RegistryKey<T> key)
      Specified by:
      getEntry in interface CommandRegistryWrapper<T>
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lhb;a(Labu;)Ljava/util/Optional;
      intermediary method_42019 Lnet/minecraft/class_7225;method_42019(Lnet/minecraft/class_5321;)Ljava/util/Optional;
      named getEntry Lnet/minecraft/command/CommandRegistryWrapper;getEntry(Lnet/minecraft/util/registry/RegistryKey;)Ljava/util/Optional;
    • streamKeys

      public Stream<RegistryKey<T>> streamKeys()
      Returns a stream of registry keys defined in the wrapped registry.
      Specified by:
      streamKeys in interface CommandRegistryWrapper<T>
      Returns:
      a stream of registry keys defined in the wrapped registry
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lhb;a()Ljava/util/stream/Stream;
      intermediary method_42017 Lnet/minecraft/class_7225;method_42017()Ljava/util/stream/Stream;
      named streamKeys Lnet/minecraft/command/CommandRegistryWrapper;streamKeys()Ljava/util/stream/Stream;
    • getEntryList

      public Optional<RegistryEntryList.Named<T>> getEntryList(TagKey<T> tag)
      Returns the entry list for the provided tag.

      Implementations have different behaviors for unrecognized tags. The default implementation returns Optional.empty(); however, the ones created by CommandRegistryAccess.createWrapper(net.minecraft.util.registry.RegistryKey<? extends net.minecraft.util.registry.Registry<T>>) can create and return a new entry list, or return an empty entry list.

      Specified by:
      getEntryList in interface CommandRegistryWrapper<T>
      Returns:
      the entry list for the provided tag
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lhb;a(Lamg;)Ljava/util/Optional;
      intermediary method_41700 Lnet/minecraft/class_7225;method_41700(Lnet/minecraft/class_6862;)Ljava/util/Optional;
      named getEntryList Lnet/minecraft/command/CommandRegistryWrapper;getEntryList(Lnet/minecraft/tag/TagKey;)Ljava/util/Optional;
    • streamTags

      public Stream<TagKey<T>> streamTags()
      Specified by:
      streamTags in interface CommandRegistryWrapper<T>
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lhb;b()Ljava/util/stream/Stream;
      intermediary method_42020 Lnet/minecraft/class_7225;method_42020()Ljava/util/stream/Stream;
      named streamTags Lnet/minecraft/command/CommandRegistryWrapper;streamTags()Ljava/util/stream/Stream;
    • withFilter

      public CommandRegistryWrapper<T> withFilter(Predicate<T> filter)
      Mappings:
      Namespace Name Mixin selector
      official a Lhb$a;a(Ljava/util/function/Predicate;)Lhb;
      intermediary method_45921 Lnet/minecraft/class_7225$class_7226;method_45921(Ljava/util/function/Predicate;)Lnet/minecraft/class_7225;
      named withFilter Lnet/minecraft/command/CommandRegistryWrapper$Impl;withFilter(Ljava/util/function/Predicate;)Lnet/minecraft/command/CommandRegistryWrapper;
    • withFeatureFilter

      public CommandRegistryWrapper<T> withFeatureFilter(FeatureSet enabledFeatures)
      Mappings:
      Namespace Name Mixin selector
      official a Lhb$a;a(Lbya;)Lhb;
      intermediary method_45919 Lnet/minecraft/class_7225$class_7226;method_45919(Lnet/minecraft/class_7699;)Lnet/minecraft/class_7225;
      named withFeatureFilter Lnet/minecraft/command/CommandRegistryWrapper$Impl;withFeatureFilter(Lnet/minecraft/resource/featuretoggle/FeatureSet;)Lnet/minecraft/command/CommandRegistryWrapper;