Record Class Tags.Appender<T,R>

java.lang.Object
java.lang.Record
com.lightning.northstar.data.Tags.Appender<T,R>
Enclosing class:
Tags<T,R>

public static record Tags.Appender<T,R>(Tags<T,R> tags, net.minecraft.tags.TagKey<T> key, net.minecraft.tags.TagBuilder builder) extends Record
  • Constructor Details

    • Appender

      public Appender(Tags<T,R> tags, net.minecraft.tags.TagKey<T> key, net.minecraft.tags.TagBuilder builder)
      Creates an instance of a Appender record class.
      Parameters:
      tags - the value for the tags record component
      key - the value for the key record component
      builder - the value for the builder record component
  • Method Details

    • add

      public Tags.Appender<T,R> add(R value)
    • opt

      public Tags.Appender<T,R> opt(R value)
    • add

      @SafeVarargs public final Tags.Appender<T,R> add(R... values)
    • opt

      @SafeVarargs public final Tags.Appender<T,R> opt(R... values)
    • add

      public Tags.Appender<T,R> add(net.minecraft.tags.TagKey<T> value)
    • opt

      public Tags.Appender<T,R> opt(net.minecraft.tags.TagKey<T> value)
    • add

      public Tags.Appender<T,R> add(Tags.Tag<T> value)
    • opt

      public Tags.Appender<T,R> opt(Tags.Tag<T> value)
    • add

      public Tags.Appender<T,R> add(Mod mod, String path)
    • opt

      public Tags.Appender<T,R> opt(Mod mod, String path)
    • toString

      public final 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
    • hashCode

      public final 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 final 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.
    • tags

      public Tags<T,R> tags()
      Returns the value of the tags record component.
      Returns:
      the value of the tags record component
    • key

      public net.minecraft.tags.TagKey<T> key()
      Returns the value of the key record component.
      Returns:
      the value of the key record component
    • builder

      public net.minecraft.tags.TagBuilder builder()
      Returns the value of the builder record component.
      Returns:
      the value of the builder record component