Record Class PoiType

java.lang.Object
java.lang.Record
net.minecraft.world.entity.ai.village.poi.PoiType

public record PoiType(Set<BlockState> matchingStates, int maxTickets, int validRange) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Set<BlockState>
    The field for the matchingStates record component.
    private final int
    The field for the maxTickets record component.
    static final Predicate<Holder<PoiType>>
     
    private final int
    The field for the validRange record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PoiType(Set<BlockState> matchingStates, int maxTickets, int validRange)
    Creates an instance of a PoiType record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    is(BlockState p_148693_)
     
    Returns the value of the matchingStates record component.
    int
    Returns the value of the maxTickets record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the validRange record component.

    Methods inherited from class java.lang.Object

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

    • matchingStates

      private final Set<BlockState> matchingStates
      The field for the matchingStates record component.
    • maxTickets

      private final int maxTickets
      The field for the maxTickets record component.
    • validRange

      private final int validRange
      The field for the validRange record component.
    • NONE

      public static final Predicate<Holder<PoiType>> NONE
  • Constructor Details

    • PoiType

      public PoiType(Set<BlockState> matchingStates, int maxTickets, int validRange)
      Creates an instance of a PoiType record class.
      Parameters:
      matchingStates - the value for the matchingStates record component
      maxTickets - the value for the maxTickets record component
      validRange - the value for the validRange record component
  • Method Details

    • is

      public boolean is(BlockState p_148693_)
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • matchingStates

      public Set<BlockState> matchingStates()
      Returns the value of the matchingStates record component.
      Returns:
      the value of the matchingStates record component
    • maxTickets

      public int maxTickets()
      Returns the value of the maxTickets record component.
      Returns:
      the value of the maxTickets record component
    • validRange

      public int validRange()
      Returns the value of the validRange record component.
      Returns:
      the value of the validRange record component