Record Class WrittenBookPredicate.PagePredicate
java.lang.Object
java.lang.Record
net.minecraft.core.component.predicates.WrittenBookPredicate.PagePredicate
- All Implemented Interfaces:
Predicate<Filterable<Component>>
- Enclosing class:
WrittenBookPredicate
public static record WrittenBookPredicate.PagePredicate(Component contents)
extends Record
implements Predicate<Filterable<Component>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<WrittenBookPredicate.PagePredicate> private final ComponentThe field for thecontentsrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPagePredicate(Component contents) Creates an instance of aPagePredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptioncontents()Returns the value of thecontentsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleantest(Filterable<Component> value) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
contents
The field for thecontentsrecord component. -
CODEC
-
-
Constructor Details
-
PagePredicate
Creates an instance of aPagePredicaterecord class.- Parameters:
contents- the value for thecontentsrecord component
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<Filterable<Component>>
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
contents
Returns the value of thecontentsrecord component.- Returns:
- the value of the
contentsrecord component
-