Class FabricRegisterEntry<T>

java.lang.Object
com.hexagram2021.chromosomelib.registry.AbstractRegisterEntry<T>
com.hexagram2021.chromosomelib.fabric.registry.FabricRegisterEntry<T>
All Implemented Interfaces:
Supplier<T>, net.minecraft.core.Holder<T>

public class FabricRegisterEntry<T> extends AbstractRegisterEntry<T>
  • Constructor Details

    • FabricRegisterEntry

      public FabricRegisterEntry(net.minecraft.core.Holder<T> holder, net.minecraft.resources.ResourceKey<T> key)
  • Method Details

    • is

      public boolean is(net.minecraft.tags.TagKey<T> tag)
      Specified by:
      is in interface net.minecraft.core.Holder<T>
      Specified by:
      is in class AbstractRegisterEntry<T>
      Parameters:
      tag - tag to check
      Returns:
      true if the entry is in the tag.
    • tags

      public Stream<net.minecraft.tags.TagKey<T>> tags()
      Specified by:
      tags in interface net.minecraft.core.Holder<T>
      Specified by:
      tags in class AbstractRegisterEntry<T>
      Returns:
      tags of the entry.
    • isBound

      public boolean isBound()
      Specified by:
      isBound in interface net.minecraft.core.Holder<T>
      Specified by:
      isBound in class AbstractRegisterEntry<T>
      Returns:
      true if the entry is bound.
    • canSerializeIn

      public boolean canSerializeIn(net.minecraft.core.HolderOwner<T> owner)
      Specified by:
      canSerializeIn in interface net.minecraft.core.Holder<T>
      Specified by:
      canSerializeIn in class AbstractRegisterEntry<T>
      Parameters:
      owner - owner of the entry
      Returns:
      true if the entry can be serialized in the owner.
      See Also:
      • Holder.Reference.canSerializeIn(net.minecraft.core.HolderOwner<T>)
    • value

      public T value()
      Specified by:
      value in interface net.minecraft.core.Holder<T>
      Specified by:
      value in class AbstractRegisterEntry<T>
      Returns:
      value of the entry.
      See Also:
      • Holder.value()
    • asHolder

      public net.minecraft.core.Holder<T> asHolder()
      Description copied from class: AbstractRegisterEntry
      Get the vanilla holder of the entry.
      Specified by:
      asHolder in class AbstractRegisterEntry<T>
      Returns:
      vanilla holder of the entry.