Class DirectRegistryEntry<T>

java.lang.Object
io.github.thecsdev.tcdcommons.client.world.registry.DirectRegistryEntry<T>
All Implemented Interfaces:
net.minecraft.registry.entry.RegistryEntry<T>

@Beta public final class DirectRegistryEntry<T> extends Object implements net.minecraft.registry.entry.RegistryEntry<T>
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.registry.entry.RegistryEntry

    net.minecraft.registry.entry.RegistryEntry.Direct<T>, net.minecraft.registry.entry.RegistryEntry.Reference<T>, net.minecraft.registry.entry.RegistryEntry.Type
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final net.minecraft.registry.RegistryKey<T>
     
    protected final T
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<net.minecraft.registry.RegistryKey<T>>
     
    com.mojang.datafixers.util.Either<net.minecraft.registry.RegistryKey<T>,T>
     
    net.minecraft.registry.entry.RegistryEntry.Type
     
    boolean
     
    boolean
    isIn(net.minecraft.registry.tag.TagKey<T> tag)
     
    boolean
    matches(Predicate<net.minecraft.registry.RegistryKey<T>> predicate)
     
    boolean
    matches(net.minecraft.registry.entry.RegistryEntry<T> arg0)
     
    boolean
    matchesId(net.minecraft.util.Identifier id)
     
    boolean
    matchesKey(net.minecraft.registry.RegistryKey<T> key)
     
    boolean
    ownerEquals(net.minecraft.registry.entry.RegistryEntryOwner<T> owner)
     
    Stream<net.minecraft.registry.tag.TagKey<T>>
     
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.registry.entry.RegistryEntry

    getIdAsString
  • Field Details

    • key

      protected final net.minecraft.registry.RegistryKey<T> key
    • value

      protected final T value
  • Constructor Details

    • DirectRegistryEntry

      public DirectRegistryEntry(T value)
  • Method Details

    • value

      public T value()
      Specified by:
      value in interface net.minecraft.registry.entry.RegistryEntry<T>
    • hasKeyAndValue

      public boolean hasKeyAndValue()
      Specified by:
      hasKeyAndValue in interface net.minecraft.registry.entry.RegistryEntry<T>
    • matchesKey

      public boolean matchesKey(net.minecraft.registry.RegistryKey<T> key)
      Specified by:
      matchesKey in interface net.minecraft.registry.entry.RegistryEntry<T>
    • isIn

      public boolean isIn(net.minecraft.registry.tag.TagKey<T> tag)
      Specified by:
      isIn in interface net.minecraft.registry.entry.RegistryEntry<T>
    • matches

      public boolean matches(Predicate<net.minecraft.registry.RegistryKey<T>> predicate)
      Specified by:
      matches in interface net.minecraft.registry.entry.RegistryEntry<T>
    • getKeyOrValue

      public com.mojang.datafixers.util.Either<net.minecraft.registry.RegistryKey<T>,T> getKeyOrValue()
      Specified by:
      getKeyOrValue in interface net.minecraft.registry.entry.RegistryEntry<T>
    • getType

      public net.minecraft.registry.entry.RegistryEntry.Type getType()
      Specified by:
      getType in interface net.minecraft.registry.entry.RegistryEntry<T>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • ownerEquals

      public boolean ownerEquals(net.minecraft.registry.entry.RegistryEntryOwner<T> owner)
      Specified by:
      ownerEquals in interface net.minecraft.registry.entry.RegistryEntry<T>
    • streamTags

      public Stream<net.minecraft.registry.tag.TagKey<T>> streamTags()
      Specified by:
      streamTags in interface net.minecraft.registry.entry.RegistryEntry<T>
    • getKey

      public Optional<net.minecraft.registry.RegistryKey<T>> getKey()
      Specified by:
      getKey in interface net.minecraft.registry.entry.RegistryEntry<T>
    • matchesId

      public boolean matchesId(net.minecraft.util.Identifier id)
      Specified by:
      matchesId in interface net.minecraft.registry.entry.RegistryEntry<T>
    • matches

      public boolean matches(net.minecraft.registry.entry.RegistryEntry<T> arg0)
      Specified by:
      matches in interface net.minecraft.registry.entry.RegistryEntry<T>