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
FieldsModifier and TypeFieldDescriptionprivate final Set<BlockState>The field for thematchingStatesrecord component.private final intThe field for themaxTicketsrecord component.private final intThe field for thevalidRangerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPoiType(Set<BlockState> matchingStates, int maxTickets, int validRange) Creates an instance of aPoiTyperecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanis(BlockState p_148693_) Returns the value of thematchingStatesrecord component.intReturns the value of themaxTicketsrecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thevalidRangerecord component.
-
Field Details
-
matchingStates
The field for thematchingStatesrecord component. -
maxTickets
private final int maxTicketsThe field for themaxTicketsrecord component. -
validRange
private final int validRangeThe field for thevalidRangerecord component. -
NONE
-
-
Constructor Details
-
PoiType
Creates an instance of aPoiTyperecord class.- Parameters:
matchingStates- the value for thematchingStatesrecord componentmaxTickets- the value for themaxTicketsrecord componentvalidRange- the value for thevalidRangerecord component
-
-
Method Details
-
is
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
matchingStates
Returns the value of thematchingStatesrecord component.- Returns:
- the value of the
matchingStatesrecord component
-
maxTickets
public int maxTickets()Returns the value of themaxTicketsrecord component.- Returns:
- the value of the
maxTicketsrecord component
-
validRange
public int validRange()Returns the value of thevalidRangerecord component.- Returns:
- the value of the
validRangerecord component
-