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
Modifier and TypeFieldDescriptionprivate final Set<BlockState>
The field for thematchingStates
record component.private final int
The field for themaxTickets
record component.private final int
The field for thevalidRange
record component. -
Constructor Summary
ConstructorDescriptionPoiType
(Set<BlockState> matchingStates, int maxTickets, int validRange) Creates an instance of aPoiType
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
is
(BlockState p_148693_) Returns the value of thematchingStates
record component.int
Returns the value of themaxTickets
record component.final String
toString()
Returns a string representation of this record class.int
Returns the value of thevalidRange
record component.
-
Field Details
-
matchingStates
The field for thematchingStates
record component. -
maxTickets
private final int maxTicketsThe field for themaxTickets
record component. -
validRange
private final int validRangeThe field for thevalidRange
record component. -
NONE
-
-
Constructor Details
-
PoiType
Creates an instance of aPoiType
record class.- Parameters:
matchingStates
- the value for thematchingStates
record componentmaxTickets
- the value for themaxTickets
record componentvalidRange
- the value for thevalidRange
record 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 thematchingStates
record component.- Returns:
- the value of the
matchingStates
record component
-
maxTickets
public int maxTickets()Returns the value of themaxTickets
record component.- Returns:
- the value of the
maxTickets
record component
-
validRange
public int validRange()Returns the value of thevalidRange
record component.- Returns:
- the value of the
validRange
record component
-