Record Class TooltipTagType<T>

java.lang.Object
java.lang.Record
dev.latvian.mods.betteradvancedtooltips.TooltipTagType<T>

public record TooltipTagType<T>(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, net.minecraft.network.chat.Component component) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TooltipTagType<net.minecraft.world.level.block.entity.BannerPattern>
     
    static final TooltipTagType<net.minecraft.world.level.block.Block>
     
    static final TooltipTagType<net.minecraft.world.item.enchantment.Enchantment>
     
    static final TooltipTagType<net.minecraft.world.entity.EntityType<?>>
     
    static final TooltipTagType<net.minecraft.world.level.material.Fluid>
     
    static final TooltipTagType<net.minecraft.world.item.Instrument>
     
    static final TooltipTagType<net.minecraft.world.item.Item>
     
    static final TooltipTagType<net.minecraft.world.entity.decoration.PaintingVariant>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    TooltipTagType(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, net.minecraft.network.chat.Component component)
    Creates an instance of a TooltipTagType record class.
    TooltipTagType(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, net.minecraft.network.chat.Style style, String symbol)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.network.chat.Component
    Returns the value of the component record component.
    boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns a hash code value for this object.
    net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>>
    Returns the value of the registryKey record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • BLOCK

      public static final TooltipTagType<net.minecraft.world.level.block.Block> BLOCK
    • ENCHANTMENT

      public static final TooltipTagType<net.minecraft.world.item.enchantment.Enchantment> ENCHANTMENT
    • ENTITY_TYPE

      public static final TooltipTagType<net.minecraft.world.entity.EntityType<?>> ENTITY_TYPE
    • FLUID

      public static final TooltipTagType<net.minecraft.world.level.material.Fluid> FLUID
    • ITEM

      public static final TooltipTagType<net.minecraft.world.item.Item> ITEM
    • INSTRUMENT

      public static final TooltipTagType<net.minecraft.world.item.Instrument> INSTRUMENT
    • PAINTING_VARIANT

      public static final TooltipTagType<net.minecraft.world.entity.decoration.PaintingVariant> PAINTING_VARIANT
  • Constructor Details

    • TooltipTagType

      public TooltipTagType(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, net.minecraft.network.chat.Style style, String symbol)
    • TooltipTagType

      public TooltipTagType(net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey, net.minecraft.network.chat.Component component)
      Creates an instance of a TooltipTagType record class.
      Parameters:
      registryKey - the value for the registryKey record component
      component - the value for the component record component
  • Method Details

    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • registryKey

      public net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> registryKey()
      Returns the value of the registryKey record component.
      Returns:
      the value of the registryKey record component
    • component

      public net.minecraft.network.chat.Component component()
      Returns the value of the component record component.
      Returns:
      the value of the component record component