Class RegistryEntry.Reference<T>

java.lang.Object
net.minecraft.util.registry.RegistryEntry.Reference<T>
All Implemented Interfaces:
RegistryEntry<T>
Enclosing interface:
RegistryEntry<T>

public static class RegistryEntry.Reference<T> extends Object implements RegistryEntry<T>
Mappings:
Namespace Name
official hc$c
intermediary net/minecraft/class_6880$class_6883
named net/minecraft/util/registry/RegistryEntry$Reference
  • Field Details

    • registry

      private final Registry<T> registry
      Mappings:
      Namespace Name Mixin selector
      official a Lhc$c;a:Lhm;
      intermediary field_36449 Lnet/minecraft/class_6880$class_6883;field_36449:Lnet/minecraft/class_2378;
      named registry Lnet/minecraft/util/registry/RegistryEntry$Reference;registry:Lnet/minecraft/util/registry/Registry;
    • tags

      private Set<TagKey<T>> tags
      Mappings:
      Namespace Name Mixin selector
      official b Lhc$c;b:Ljava/util/Set;
      intermediary field_36450 Lnet/minecraft/class_6880$class_6883;field_36450:Ljava/util/Set;
      named tags Lnet/minecraft/util/registry/RegistryEntry$Reference;tags:Ljava/util/Set;
    • referenceType

      private final RegistryEntry.Reference.Type referenceType
      Mappings:
      Namespace Name Mixin selector
      official c Lhc$c;c:Lhc$c$a;
      intermediary field_36451 Lnet/minecraft/class_6880$class_6883;field_36451:Lnet/minecraft/class_6880$class_6883$class_6884;
      named referenceType Lnet/minecraft/util/registry/RegistryEntry$Reference;referenceType:Lnet/minecraft/util/registry/RegistryEntry$Reference$Type;
    • registryKey

      @Nullable private @Nullable RegistryKey<T> registryKey
      Mappings:
      Namespace Name Mixin selector
      official d Lhc$c;d:Laba;
      intermediary field_36452 Lnet/minecraft/class_6880$class_6883;field_36452:Lnet/minecraft/class_5321;
      named registryKey Lnet/minecraft/util/registry/RegistryEntry$Reference;registryKey:Lnet/minecraft/util/registry/RegistryKey;
    • value

      @Nullable private T value
      Mappings:
      Namespace Name Mixin selector
      official e Lhc$c;e:Ljava/lang/Object;
      intermediary field_36453 Lnet/minecraft/class_6880$class_6883;field_36453:Ljava/lang/Object;
      named value Lnet/minecraft/util/registry/RegistryEntry$Reference;value:Ljava/lang/Object;
  • Constructor Details

    • Reference

      private Reference(RegistryEntry.Reference.Type referenceType, Registry<T> registry, @Nullable @Nullable RegistryKey<T> registryKey, @Nullable T value)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lhc$c;<init>(Lhc$c$a;Lhm;Laba;Ljava/lang/Object;)V
      intermediary <init> Lnet/minecraft/class_6880$class_6883;<init>(Lnet/minecraft/class_6880$class_6883$class_6884;Lnet/minecraft/class_2378;Lnet/minecraft/class_5321;Ljava/lang/Object;)V
      named <init> Lnet/minecraft/util/registry/RegistryEntry$Reference;<init>(Lnet/minecraft/util/registry/RegistryEntry$Reference$Type;Lnet/minecraft/util/registry/Registry;Lnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;)V
  • Method Details

    • standAlone

      public static <T> RegistryEntry.Reference<T> standAlone(Registry<T> registry, RegistryKey<T> registryKey)
      Mappings:
      Namespace Name Mixin selector
      official a Lhc$c;a(Lhm;Laba;)Lhc$c;
      intermediary method_40234 Lnet/minecraft/class_6880$class_6883;method_40234(Lnet/minecraft/class_2378;Lnet/minecraft/class_5321;)Lnet/minecraft/class_6880$class_6883;
      named standAlone Lnet/minecraft/util/registry/RegistryEntry$Reference;standAlone(Lnet/minecraft/util/registry/Registry;Lnet/minecraft/util/registry/RegistryKey;)Lnet/minecraft/util/registry/RegistryEntry$Reference;
    • intrusive

      @Deprecated public static <T> RegistryEntry.Reference<T> intrusive(Registry<T> registry, @Nullable T value)
      Deprecated.
      Mappings:
      Namespace Name Mixin selector
      official a Lhc$c;a(Lhm;Ljava/lang/Object;)Lhc$c;
      intermediary method_40233 Lnet/minecraft/class_6880$class_6883;method_40233(Lnet/minecraft/class_2378;Ljava/lang/Object;)Lnet/minecraft/class_6880$class_6883;
      named intrusive Lnet/minecraft/util/registry/RegistryEntry$Reference;intrusive(Lnet/minecraft/util/registry/Registry;Ljava/lang/Object;)Lnet/minecraft/util/registry/RegistryEntry$Reference;
    • registryKey

      public RegistryKey<T> registryKey()
      Mappings:
      Namespace Name Mixin selector
      official g Lhc$c;g()Laba;
      intermediary method_40237 Lnet/minecraft/class_6880$class_6883;method_40237()Lnet/minecraft/class_5321;
      named registryKey Lnet/minecraft/util/registry/RegistryEntry$Reference;registryKey()Lnet/minecraft/util/registry/RegistryKey;
    • value

      public T value()
      Specified by:
      value in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lhc;a()Ljava/lang/Object;
      intermediary comp_349 Lnet/minecraft/class_6880;comp_349()Ljava/lang/Object;
      named value Lnet/minecraft/util/registry/RegistryEntry;value()Ljava/lang/Object;
    • matchesId

      public boolean matchesId(Identifier id)
      Specified by:
      matchesId in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lhc;a(Labb;)Z
      intermediary method_40226 Lnet/minecraft/class_6880;method_40226(Lnet/minecraft/class_2960;)Z
      named matchesId Lnet/minecraft/util/registry/RegistryEntry;matchesId(Lnet/minecraft/util/Identifier;)Z
    • matchesKey

      public boolean matchesKey(RegistryKey<T> key)
      Specified by:
      matchesKey in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lhc;a(Laba;)Z
      intermediary method_40225 Lnet/minecraft/class_6880;method_40225(Lnet/minecraft/class_5321;)Z
      named matchesKey Lnet/minecraft/util/registry/RegistryEntry;matchesKey(Lnet/minecraft/util/registry/RegistryKey;)Z
    • isIn

      public boolean isIn(TagKey<T> tag)
      Specified by:
      isIn in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lhc;a(Lakz;)Z
      intermediary method_40220 Lnet/minecraft/class_6880;method_40220(Lnet/minecraft/class_6862;)Z
      named isIn Lnet/minecraft/util/registry/RegistryEntry;isIn(Lnet/minecraft/tag/TagKey;)Z
    • matches

      public boolean matches(Predicate<RegistryKey<T>> predicate)
      Specified by:
      matches in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lhc;a(Ljava/util/function/Predicate;)Z
      intermediary method_40224 Lnet/minecraft/class_6880;method_40224(Ljava/util/function/Predicate;)Z
      named matches Lnet/minecraft/util/registry/RegistryEntry;matches(Ljava/util/function/Predicate;)Z
    • matchesRegistry

      public boolean matchesRegistry(Registry<T> registry)
      Specified by:
      matchesRegistry in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lhc;a(Lhm;)Z
      intermediary method_40222 Lnet/minecraft/class_6880;method_40222(Lnet/minecraft/class_2378;)Z
      named matchesRegistry Lnet/minecraft/util/registry/RegistryEntry;matchesRegistry(Lnet/minecraft/util/registry/Registry;)Z
    • getKeyOrValue

      public com.mojang.datafixers.util.Either<RegistryKey<T>,T> getKeyOrValue()
      Specified by:
      getKeyOrValue in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official d Lhc;d()Lcom/mojang/datafixers/util/Either;
      intermediary method_40229 Lnet/minecraft/class_6880;method_40229()Lcom/mojang/datafixers/util/Either;
      named getKeyOrValue Lnet/minecraft/util/registry/RegistryEntry;getKeyOrValue()Lcom/mojang/datafixers/util/Either;
    • getKey

      public Optional<RegistryKey<T>> getKey()
      Specified by:
      getKey in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official e Lhc;e()Ljava/util/Optional;
      intermediary method_40230 Lnet/minecraft/class_6880;method_40230()Ljava/util/Optional;
      named getKey Lnet/minecraft/util/registry/RegistryEntry;getKey()Ljava/util/Optional;
    • getType

      public RegistryEntry.Type getType()
      Specified by:
      getType in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official f Lhc;f()Lhc$b;
      intermediary method_40231 Lnet/minecraft/class_6880;method_40231()Lnet/minecraft/class_6880$class_6882;
      named getType Lnet/minecraft/util/registry/RegistryEntry;getType()Lnet/minecraft/util/registry/RegistryEntry$Type;
    • hasKeyAndValue

      public boolean hasKeyAndValue()
      Specified by:
      hasKeyAndValue in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official b Lhc;b()Z
      intermediary method_40227 Lnet/minecraft/class_6880;method_40227()Z
      named hasKeyAndValue Lnet/minecraft/util/registry/RegistryEntry;hasKeyAndValue()Z
    • setKeyAndValue

      void setKeyAndValue(RegistryKey<T> key, T value)
      Mappings:
      Namespace Name Mixin selector
      official a Lhc$c;a(Laba;Ljava/lang/Object;)V
      intermediary method_40236 Lnet/minecraft/class_6880$class_6883;method_40236(Lnet/minecraft/class_5321;Ljava/lang/Object;)V
      named setKeyAndValue Lnet/minecraft/util/registry/RegistryEntry$Reference;setKeyAndValue(Lnet/minecraft/util/registry/RegistryKey;Ljava/lang/Object;)V
    • setTags

      void setTags(Collection<TagKey<T>> tags)
      Mappings:
      Namespace Name Mixin selector
      official a Lhc$c;a(Ljava/util/Collection;)V
      intermediary method_40235 Lnet/minecraft/class_6880$class_6883;method_40235(Ljava/util/Collection;)V
      named setTags Lnet/minecraft/util/registry/RegistryEntry$Reference;setTags(Ljava/util/Collection;)V
    • streamTags

      public Stream<TagKey<T>> streamTags()
      Specified by:
      streamTags in interface RegistryEntry<T>
      Mappings:
      Namespace Name Mixin selector
      official c Lhc;c()Ljava/util/stream/Stream;
      intermediary method_40228 Lnet/minecraft/class_6880;method_40228()Ljava/util/stream/Stream;
      named streamTags Lnet/minecraft/util/registry/RegistryEntry;streamTags()Ljava/util/stream/Stream;
    • toString

      public String toString()
      Overrides:
      toString in class Object