Class SimpleRegistry<T>

All Implemented Interfaces:
com.mojang.serialization.Keyable, Iterable<T>, IndexedIterable<T>
Direct Known Subclasses:
DefaultedRegistry

public class SimpleRegistry<T> extends MutableRegistry<T>
An implementation of a mutable registry. All vanilla registries use this (or its subclass, DefaultedRegistry).
See Also:
Mappings:
Namespace Name
official hg
intermediary net/minecraft/class_2370
named net/minecraft/util/registry/SimpleRegistry
  • Field Details

    • field_36635

      private static final Logger field_36635
      Mappings:
      Namespace Name Mixin selector
      official bR Lhg;bR:Lorg/slf4j/Logger;
      intermediary field_36635 Lnet/minecraft/class_2370;field_36635:Lorg/slf4j/Logger;
      named field_36635 Lnet/minecraft/util/registry/SimpleRegistry;field_36635:Lorg/slf4j/Logger;
    • rawIdToEntry

      private final ObjectList<RegistryEntry.Reference<T>> rawIdToEntry
      Mappings:
      Namespace Name Mixin selector
      official bS Lhg;bS:Lit/unimi/dsi/fastutil/objects/ObjectList;
      intermediary field_26682 Lnet/minecraft/class_2370;field_26682:Lit/unimi/dsi/fastutil/objects/ObjectList;
      named rawIdToEntry Lnet/minecraft/util/registry/SimpleRegistry;rawIdToEntry:Lit/unimi/dsi/fastutil/objects/ObjectList;
    • entryToRawId

      private final Object2IntMap<T> entryToRawId
      Mappings:
      Namespace Name Mixin selector
      official bT Lhg;bT:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
      intermediary field_26683 Lnet/minecraft/class_2370;field_26683:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
      named entryToRawId Lnet/minecraft/util/registry/SimpleRegistry;entryToRawId:Lit/unimi/dsi/fastutil/objects/Object2IntMap;
    • idToEntry

      private final Map<Identifier,RegistryEntry.Reference<T>> idToEntry
      Mappings:
      Namespace Name Mixin selector
      official bU Lhg;bU:Ljava/util/Map;
      intermediary field_11107 Lnet/minecraft/class_2370;field_11107:Ljava/util/Map;
      named idToEntry Lnet/minecraft/util/registry/SimpleRegistry;idToEntry:Ljava/util/Map;
    • keyToEntry

      private final Map<RegistryKey<T>,RegistryEntry.Reference<T>> keyToEntry
      Mappings:
      Namespace Name Mixin selector
      official bV Lhg;bV:Ljava/util/Map;
      intermediary field_25067 Lnet/minecraft/class_2370;field_25067:Ljava/util/Map;
      named keyToEntry Lnet/minecraft/util/registry/SimpleRegistry;keyToEntry:Ljava/util/Map;
    • valueToEntry

      private final Map<T,RegistryEntry.Reference<T>> valueToEntry
      Mappings:
      Namespace Name Mixin selector
      official bW Lhg;bW:Ljava/util/Map;
      intermediary field_36461 Lnet/minecraft/class_2370;field_36461:Ljava/util/Map;
      named valueToEntry Lnet/minecraft/util/registry/SimpleRegistry;valueToEntry:Ljava/util/Map;
    • entryToLifecycle

      private final Map<T,com.mojang.serialization.Lifecycle> entryToLifecycle
      Mappings:
      Namespace Name Mixin selector
      official bX Lhg;bX:Ljava/util/Map;
      intermediary field_26731 Lnet/minecraft/class_2370;field_26731:Ljava/util/Map;
      named entryToLifecycle Lnet/minecraft/util/registry/SimpleRegistry;entryToLifecycle:Ljava/util/Map;
    • lifecycle

      private com.mojang.serialization.Lifecycle lifecycle
      Mappings:
      Namespace Name Mixin selector
      official bY Lhg;bY:Lcom/mojang/serialization/Lifecycle;
      intermediary field_26732 Lnet/minecraft/class_2370;field_26732:Lcom/mojang/serialization/Lifecycle;
      named lifecycle Lnet/minecraft/util/registry/SimpleRegistry;lifecycle:Lcom/mojang/serialization/Lifecycle;
    • tagToEntryList

      private volatile Map<TagKey<T>,RegistryEntryList.Named<T>> tagToEntryList
      Mappings:
      Namespace Name Mixin selector
      official bZ Lhg;bZ:Ljava/util/Map;
      intermediary field_36462 Lnet/minecraft/class_2370;field_36462:Ljava/util/Map;
      named tagToEntryList Lnet/minecraft/util/registry/SimpleRegistry;tagToEntryList:Ljava/util/Map;
    • frozen

      private boolean frozen
      Mappings:
      Namespace Name Mixin selector
      official ca Lhg;ca:Z
      intermediary field_36463 Lnet/minecraft/class_2370;field_36463:Z
      named frozen Lnet/minecraft/util/registry/SimpleRegistry;frozen:Z
    • intrusiveValueToEntry

      @Nullable private @Nullable Map<T,RegistryEntry.Reference<T>> intrusiveValueToEntry
      Mappings:
      Namespace Name Mixin selector
      official cb Lhg;cb:Ljava/util/Map;
      intermediary field_40584 Lnet/minecraft/class_2370;field_40584:Ljava/util/Map;
      named intrusiveValueToEntry Lnet/minecraft/util/registry/SimpleRegistry;intrusiveValueToEntry:Ljava/util/Map;
    • cachedEntries

      Mappings:
      Namespace Name Mixin selector
      official cc Lhg;cc:Ljava/util/List;
      intermediary field_36634 Lnet/minecraft/class_2370;field_36634:Ljava/util/List;
      named cachedEntries Lnet/minecraft/util/registry/SimpleRegistry;cachedEntries:Ljava/util/List;
    • nextId

      private int nextId
      Mappings:
      Namespace Name Mixin selector
      official cd Lhg;cd:I
      intermediary field_11109 Lnet/minecraft/class_2370;field_11109:I
      named nextId Lnet/minecraft/util/registry/SimpleRegistry;nextId:I
  • Constructor Details

    • SimpleRegistry

      public SimpleRegistry(RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lhl;<init>(Labu;Lcom/mojang/serialization/Lifecycle;)V
      intermediary <init> Lnet/minecraft/class_2378;<init>(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;)V
      named <init> Lnet/minecraft/util/registry/Registry;<init>(Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;)V
    • SimpleRegistry

      public SimpleRegistry(RegistryKey<? extends Registry<T>> key, com.mojang.serialization.Lifecycle lifecycle, boolean intrusive)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lhg;<init>(Labu;Lcom/mojang/serialization/Lifecycle;Z)V
      intermediary <init> Lnet/minecraft/class_2370;<init>(Lnet/minecraft/class_5321;Lcom/mojang/serialization/Lifecycle;Z)V
      named <init> Lnet/minecraft/util/registry/SimpleRegistry;<init>(Lnet/minecraft/util/registry/RegistryKey;Lcom/mojang/serialization/Lifecycle;Z)V
  • Method Details

    • getEntries

      private List<RegistryEntry.Reference<T>> getEntries()
      Mappings:
      Namespace Name Mixin selector
      official a Lhg;a()Ljava/util/List;
      intermediary method_40561 Lnet/minecraft/class_2370;method_40561()Ljava/util/List;
      named getEntries Lnet/minecraft/util/registry/SimpleRegistry;getEntries()Ljava/util/List;
    • assertNotFrozen

      private void assertNotFrozen()
      Mappings:
      Namespace Name Mixin selector
      official s Lhg;s()V
      intermediary method_45939 Lnet/minecraft/class_2370;method_45939()V
      named assertNotFrozen Lnet/minecraft/util/registry/SimpleRegistry;assertNotFrozen()V
    • assertNotFrozen

      private void assertNotFrozen(RegistryKey<T> key)
      Mappings:
      Namespace Name Mixin selector
      official k Lhg;k(Labu;)V
      intermediary method_40274 Lnet/minecraft/class_2370;method_40274(Lnet/minecraft/class_5321;)V
      named assertNotFrozen Lnet/minecraft/util/registry/SimpleRegistry;assertNotFrozen(Lnet/minecraft/util/registry/RegistryKey;)V
    • set

      public RegistryEntry<T> set(int rawId, RegistryKey<T> key, T value, com.mojang.serialization.Lifecycle lifecycle)
      Specified by:
      set in class MutableRegistry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lht;a(ILabu;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lha;
      intermediary method_10273 Lnet/minecraft/class_2385;method_10273(ILnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/class_6880;
      named set Lnet/minecraft/util/registry/MutableRegistry;set(ILnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/util/registry/RegistryEntry;
    • add

      public RegistryEntry<T> add(RegistryKey<T> key, T entry, com.mojang.serialization.Lifecycle lifecycle)
      Specified by:
      add in class MutableRegistry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lht;a(Labu;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lha;
      intermediary method_10272 Lnet/minecraft/class_2385;method_10272(Lnet/minecraft/class_5321;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/class_6880;
      named add Lnet/minecraft/util/registry/MutableRegistry;add(Lnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;Lcom/mojang/serialization/Lifecycle;)Lnet/minecraft/util/registry/RegistryEntry;
    • getId

      @Nullable public @Nullable Identifier getId(T value)
      Returns the ID assigned to value, or null if it is not registered.
      Specified by:
      getId in class Registry<T>
      Returns:
      the ID assigned to value, or null if it is not registered
      Mappings:
      Namespace Name Mixin selector
      official b Lhl;b(Ljava/lang/Object;)Labv;
      intermediary method_10221 Lnet/minecraft/class_2378;method_10221(Ljava/lang/Object;)Lnet/minecraft/class_2960;
      named getId Lnet/minecraft/util/registry/Registry;getId(Ljava/lang/Object;)Lnet/minecraft/util/Identifier;
    • getKey

      public Optional<RegistryKey<T>> getKey(T entry)
      Returns the registry key of value, or an empty optional if it is not registered.
      Specified by:
      getKey in class Registry<T>
      Returns:
      the registry key of value, or an empty optional if it is not registered
      Mappings:
      Namespace Name Mixin selector
      official c Lhl;c(Ljava/lang/Object;)Ljava/util/Optional;
      intermediary method_29113 Lnet/minecraft/class_2378;method_29113(Ljava/lang/Object;)Ljava/util/Optional;
      named getKey Lnet/minecraft/util/registry/Registry;getKey(Ljava/lang/Object;)Ljava/util/Optional;
    • getRawId

      public int getRawId(@Nullable T value)
      Specified by:
      getRawId in interface IndexedIterable<T>
      Specified by:
      getRawId in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lhd;a(Ljava/lang/Object;)I
      intermediary method_10206 Lnet/minecraft/class_2359;method_10206(Ljava/lang/Object;)I
      named getRawId Lnet/minecraft/util/collection/IndexedIterable;getRawId(Ljava/lang/Object;)I
    • get

      Returns the value that is assigned key, or null if there is none.
      Specified by:
      get in class Registry<T>
      Returns:
      the value that is assigned key, or null if there is none
      Mappings:
      Namespace Name Mixin selector
      official a Lhl;a(Labu;)Ljava/lang/Object;
      intermediary method_29107 Lnet/minecraft/class_2378;method_29107(Lnet/minecraft/class_5321;)Ljava/lang/Object;
      named get Lnet/minecraft/util/registry/Registry;get(Lnet/minecraft/util/registry/RegistryKey;)Ljava/lang/Object;
    • get

      @Nullable public T get(int index)
      Mappings:
      Namespace Name Mixin selector
      official a Lhd;a(I)Ljava/lang/Object;
      intermediary method_10200 Lnet/minecraft/class_2359;method_10200(I)Ljava/lang/Object;
      named get Lnet/minecraft/util/collection/IndexedIterable;get(I)Ljava/lang/Object;
    • getEntry

      public Optional<RegistryEntry.Reference<T>> getEntry(int rawId)
      Returns the reference registry entry for the value assigned rawId, or an empty optional if there is no such value.
      Specified by:
      getEntry in class Registry<T>
      Returns:
      the reference registry entry for the value assigned rawId, or an empty optional if there is no such value
      Mappings:
      Namespace Name Mixin selector
      official c Lhl;c(I)Ljava/util/Optional;
      intermediary method_40265 Lnet/minecraft/class_2378;method_40265(I)Ljava/util/Optional;
      named getEntry Lnet/minecraft/util/registry/Registry;getEntry(I)Ljava/util/Optional;
    • getEntry

      public Optional<RegistryEntry.Reference<T>> getEntry(RegistryKey<T> key)
      Returns the reference registry entry for the value assigned key, or an empty optional if there is no such value.
      Specified by:
      getEntry in class Registry<T>
      Returns:
      the reference registry entry for the value assigned key, or an empty optional if there is no such value
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lhl;b(Labu;)Ljava/util/Optional;
      intermediary method_40264 Lnet/minecraft/class_2378;method_40264(Lnet/minecraft/class_5321;)Ljava/util/Optional;
      named getEntry Lnet/minecraft/util/registry/Registry;getEntry(Lnet/minecraft/util/registry/RegistryKey;)Ljava/util/Optional;
    • getOrCreateEntry

      public RegistryEntry.Reference<T> getOrCreateEntry(RegistryKey<T> key)
      Specified by:
      getOrCreateEntry in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official c Lhl;c(Labu;)Lha$c;
      intermediary method_44298 Lnet/minecraft/class_2378;method_44298(Lnet/minecraft/class_5321;)Lnet/minecraft/class_6880$class_6883;
      named getOrCreateEntry Lnet/minecraft/util/registry/Registry;getOrCreateEntry(Lnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/util/registry/RegistryEntry$Reference;
    • getOrCreateEntryDataResult

      public com.mojang.serialization.DataResult<RegistryEntry.Reference<T>> getOrCreateEntryDataResult(RegistryKey<T> key)
      Specified by:
      getOrCreateEntryDataResult in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official d Lhl;d(Labu;)Lcom/mojang/serialization/DataResult;
      intermediary method_40268 Lnet/minecraft/class_2378;method_40268(Lnet/minecraft/class_5321;)Lcom/mojang/serialization/DataResult;
      named getOrCreateEntryDataResult Lnet/minecraft/util/registry/Registry;getOrCreateEntryDataResult(Lnet/minecraft/util/registry/RegistryKey;)Lcom/mojang/serialization/DataResult;
    • size

      public int size()
      Mappings:
      Namespace Name Mixin selector
      official b Lhd;b()I
      intermediary method_10204 Lnet/minecraft/class_2359;method_10204()I
      named size Lnet/minecraft/util/collection/IndexedIterable;size()I
    • getEntryLifecycle

      public com.mojang.serialization.Lifecycle getEntryLifecycle(T entry)
      Gets the lifecycle of a registry entry.
      Specified by:
      getEntryLifecycle in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official d Lhl;d(Ljava/lang/Object;)Lcom/mojang/serialization/Lifecycle;
      intermediary method_31139 Lnet/minecraft/class_2378;method_31139(Ljava/lang/Object;)Lcom/mojang/serialization/Lifecycle;
      named getEntryLifecycle Lnet/minecraft/util/registry/Registry;getEntryLifecycle(Ljava/lang/Object;)Lcom/mojang/serialization/Lifecycle;
    • getLifecycle

      public com.mojang.serialization.Lifecycle getLifecycle()
      Specified by:
      getLifecycle in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official c Lhl;c()Lcom/mojang/serialization/Lifecycle;
      intermediary method_31138 Lnet/minecraft/class_2378;method_31138()Lcom/mojang/serialization/Lifecycle;
      named getLifecycle Lnet/minecraft/util/registry/Registry;getLifecycle()Lcom/mojang/serialization/Lifecycle;
    • iterator

      public Iterator<T> iterator()
    • get

      Returns the value that is assigned id, or null if there is none.
      Specified by:
      get in class Registry<T>
      Returns:
      the value that is assigned id, or null if there is none
      Mappings:
      Namespace Name Mixin selector
      official a Lhl;a(Labv;)Ljava/lang/Object;
      intermediary method_10223 Lnet/minecraft/class_2378;method_10223(Lnet/minecraft/class_2960;)Ljava/lang/Object;
      named get Lnet/minecraft/util/registry/Registry;get(Lnet/minecraft/util/Identifier;)Ljava/lang/Object;
    • getValue

      @Nullable private static <T> T getValue(@Nullable RegistryEntry.Reference<T> entry)
      Mappings:
      Namespace Name Mixin selector
      official a Lhg;a(Lha$c;)Ljava/lang/Object;
      intermediary method_40253 Lnet/minecraft/class_2370;method_40253(Lnet/minecraft/class_6880$class_6883;)Ljava/lang/Object;
      named getValue Lnet/minecraft/util/registry/SimpleRegistry;getValue(Lnet/minecraft/util/registry/RegistryEntry$Reference;)Ljava/lang/Object;
    • getIds

      public Set<Identifier> getIds()
      Returns the set of all IDs registered in a registry.
      Specified by:
      getIds in class Registry<T>
      Returns:
      the set of all IDs registered in a registry
      Mappings:
      Namespace Name Mixin selector
      official d Lhl;d()Ljava/util/Set;
      intermediary method_10235 Lnet/minecraft/class_2378;method_10235()Ljava/util/Set;
      named getIds Lnet/minecraft/util/registry/Registry;getIds()Ljava/util/Set;
    • getKeys

      public Set<RegistryKey<T>> getKeys()
      Returns the set of all registry keys registered in a registry.
      Specified by:
      getKeys in class Registry<T>
      Returns:
      the set of all registry keys registered in a registry
      Mappings:
      Namespace Name Mixin selector
      official e Lhl;e()Ljava/util/Set;
      intermediary method_42021 Lnet/minecraft/class_2378;method_42021()Ljava/util/Set;
      named getKeys Lnet/minecraft/util/registry/Registry;getKeys()Ljava/util/Set;
    • getEntrySet

      public Set<Map.Entry<RegistryKey<T>,T>> getEntrySet()
      Returns the set containing Map.Entry of the registry keys and values registered in this registry.
      Specified by:
      getEntrySet in class Registry<T>
      Returns:
      the set containing Map.Entry of the registry keys and values registered in this registry
      Mappings:
      Namespace Name Mixin selector
      official f Lhl;f()Ljava/util/Set;
      intermediary method_29722 Lnet/minecraft/class_2378;method_29722()Ljava/util/Set;
      named getEntrySet Lnet/minecraft/util/registry/Registry;getEntrySet()Ljava/util/Set;
    • streamEntries

      public Stream<RegistryEntry.Reference<T>> streamEntries()
      Returns a stream of reference registry entries of this registry.
      Specified by:
      streamEntries in class Registry<T>
      Returns:
      a stream of reference registry entries of this registry
      Mappings:
      Namespace Name Mixin selector
      official g Lhl;g()Ljava/util/stream/Stream;
      intermediary method_40270 Lnet/minecraft/class_2378;method_40270()Ljava/util/stream/Stream;
      named streamEntries Lnet/minecraft/util/registry/Registry;streamEntries()Ljava/util/stream/Stream;
    • containsTag

      public boolean containsTag(TagKey<T> tag)
      Returns whether tag is known to this registry.
      Specified by:
      containsTag in class Registry<T>
      Returns:
      whether tag is known to this registry
      Mappings:
      Namespace Name Mixin selector
      official a Lhl;a(Lamg;)Z
      intermediary method_40252 Lnet/minecraft/class_2378;method_40252(Lnet/minecraft/class_6862;)Z
      named containsTag Lnet/minecraft/util/registry/Registry;containsTag(Lnet/minecraft/tag/TagKey;)Z
    • streamTagsAndEntries

      public Stream<com.mojang.datafixers.util.Pair<TagKey<T>,RegistryEntryList.Named<T>>> streamTagsAndEntries()
      Specified by:
      streamTagsAndEntries in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official h Lhl;h()Ljava/util/stream/Stream;
      intermediary method_40272 Lnet/minecraft/class_2378;method_40272()Ljava/util/stream/Stream;
      named streamTagsAndEntries Lnet/minecraft/util/registry/Registry;streamTagsAndEntries()Ljava/util/stream/Stream;
    • getOrCreateEntryList

      public RegistryEntryList.Named<T> getOrCreateEntryList(TagKey<T> tag)
      Specified by:
      getOrCreateEntryList in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official b Lhl;b(Lamg;)Lhc$c;
      intermediary method_40260 Lnet/minecraft/class_2378;method_40260(Lnet/minecraft/class_6862;)Lnet/minecraft/class_6885$class_6888;
      named getOrCreateEntryList Lnet/minecraft/util/registry/Registry;getOrCreateEntryList(Lnet/minecraft/tag/TagKey;)Lnet/minecraft/util/registry/RegistryEntryList$Named;
    • createNamedEntryList

      private RegistryEntryList.Named<T> createNamedEntryList(TagKey<T> tag)
      Mappings:
      Namespace Name Mixin selector
      official e Lhg;e(Lamg;)Lhc$c;
      intermediary method_40562 Lnet/minecraft/class_2370;method_40562(Lnet/minecraft/class_6862;)Lnet/minecraft/class_6885$class_6888;
      named createNamedEntryList Lnet/minecraft/util/registry/SimpleRegistry;createNamedEntryList(Lnet/minecraft/tag/TagKey;)Lnet/minecraft/util/registry/RegistryEntryList$Named;
    • streamTags

      public Stream<TagKey<T>> streamTags()
      Returns a stream of all tag keys known to this registry.
      Specified by:
      streamTags in class Registry<T>
      Returns:
      a stream of all tag keys known to this registry
      Mappings:
      Namespace Name Mixin selector
      official i Lhl;i()Ljava/util/stream/Stream;
      intermediary method_40273 Lnet/minecraft/class_2378;method_40273()Ljava/util/stream/Stream;
      named streamTags Lnet/minecraft/util/registry/Registry;streamTags()Ljava/util/stream/Stream;
    • isEmpty

      public boolean isEmpty()
      Returns whether the registry is empty.
      Specified by:
      isEmpty in class MutableRegistry<T>
      Returns:
      whether the registry is empty
      Mappings:
      Namespace Name Mixin selector
      official j Lht;j()Z
      intermediary method_35863 Lnet/minecraft/class_2385;method_35863()Z
      named isEmpty Lnet/minecraft/util/registry/MutableRegistry;isEmpty()Z
    • getRandom

      public Optional<RegistryEntry<T>> getRandom(Random random)
      Returns a random registry entry from this registry, or an empty optional if the registry is empty.
      Specified by:
      getRandom in class Registry<T>
      Returns:
      a random registry entry from this registry, or an empty optional if the registry is empty
      Mappings:
      Namespace Name Mixin selector
      official a Lhl;a(Lanu;)Ljava/util/Optional;
      intermediary method_10240 Lnet/minecraft/class_2378;method_10240(Lnet/minecraft/class_5819;)Ljava/util/Optional;
      named getRandom Lnet/minecraft/util/registry/Registry;getRandom(Lnet/minecraft/util/math/random/Random;)Ljava/util/Optional;
    • containsId

      public boolean containsId(Identifier id)
      Returns whether id is registered in this registry.
      Specified by:
      containsId in class Registry<T>
      Returns:
      whether id is registered in this registry
      Mappings:
      Namespace Name Mixin selector
      official c Lhl;c(Labv;)Z
      intermediary method_10250 Lnet/minecraft/class_2378;method_10250(Lnet/minecraft/class_2960;)Z
      named containsId Lnet/minecraft/util/registry/Registry;containsId(Lnet/minecraft/util/Identifier;)Z
    • contains

      public boolean contains(RegistryKey<T> key)
      Returns whether key is registered in this registry.
      Specified by:
      contains in class Registry<T>
      Returns:
      whether key is registered in this registry
      Mappings:
      Namespace Name Mixin selector
      official e Lhl;e(Labu;)Z
      intermediary method_35842 Lnet/minecraft/class_2378;method_35842(Lnet/minecraft/class_5321;)Z
      named contains Lnet/minecraft/util/registry/Registry;contains(Lnet/minecraft/util/registry/RegistryKey;)Z
    • freeze

      public Registry<T> freeze()
      Specified by:
      freeze in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official k Lhl;k()Lhl;
      intermediary method_40276 Lnet/minecraft/class_2378;method_40276()Lnet/minecraft/class_2378;
      named freeze Lnet/minecraft/util/registry/Registry;freeze()Lnet/minecraft/util/registry/Registry;
    • createEntry

      public RegistryEntry.Reference<T> createEntry(T value)
      Specified by:
      createEntry in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official e Lhl;e(Ljava/lang/Object;)Lha$c;
      intermediary method_40269 Lnet/minecraft/class_2378;method_40269(Ljava/lang/Object;)Lnet/minecraft/class_6880$class_6883;
      named createEntry Lnet/minecraft/util/registry/Registry;createEntry(Ljava/lang/Object;)Lnet/minecraft/util/registry/RegistryEntry$Reference;
    • getEntryList

      public Optional<RegistryEntryList.Named<T>> getEntryList(TagKey<T> tag)
      Returns the registry entry list of values that are assigned tag, or an empty optional if the tag is not known to the registry.
      Specified by:
      getEntryList in class Registry<T>
      Returns:
      the registry entry list of values that are assigned tag, or an empty optional if the tag is not known to the registry
      Mappings:
      Namespace Name Mixin selector
      official c Lhl;c(Lamg;)Ljava/util/Optional;
      intermediary method_40266 Lnet/minecraft/class_2378;method_40266(Lnet/minecraft/class_6862;)Ljava/util/Optional;
      named getEntryList Lnet/minecraft/util/registry/Registry;getEntryList(Lnet/minecraft/tag/TagKey;)Ljava/util/Optional;
    • populateTags

      public void populateTags(Map<TagKey<T>,List<RegistryEntry<T>>> tagEntries)
      Specified by:
      populateTags in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lhl;a(Ljava/util/Map;)V
      intermediary method_40257 Lnet/minecraft/class_2378;method_40257(Ljava/util/Map;)V
      named populateTags Lnet/minecraft/util/registry/Registry;populateTags(Ljava/util/Map;)V
    • clearTags

      public void clearTags()
      Specified by:
      clearTags in class Registry<T>
      Mappings:
      Namespace Name Mixin selector
      official l Lhl;l()V
      intermediary method_40278 Lnet/minecraft/class_2378;method_40278()V
      named clearTags Lnet/minecraft/util/registry/Registry;clearTags()V