Record Class PoiSection.Packed
java.lang.Object
java.lang.Record
net.minecraft.world.entity.ai.village.poi.PoiSection.Packed
- Enclosing class:
PoiSection
public static record PoiSection.Packed(boolean isValid, List<PoiRecord.Packed> records)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PoiSection.Packed> private final booleanThe field for theisValidrecord component.private final List<PoiRecord.Packed> The field for therecordsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPacked(boolean isValid, List<PoiRecord.Packed> records) Creates an instance of aPackedrecord 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.booleanisValid()Returns the value of theisValidrecord component.records()Returns the value of therecordsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
isValid
private final boolean isValidThe field for theisValidrecord component. -
records
The field for therecordsrecord component. -
CODEC
-
-
Constructor Details
-
Packed
Creates an instance of aPackedrecord class.- Parameters:
isValid- the value for theisValidrecord componentrecords- the value for therecordsrecord component
-
-
Method Details
-
unpack
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
isValid
public boolean isValid()Returns the value of theisValidrecord component.- Returns:
- the value of the
isValidrecord component
-
records
Returns the value of therecordsrecord component.- Returns:
- the value of the
recordsrecord component
-