Package net.minecraft.predicate.item
Record Class WrittenBookContentPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.item.WrittenBookContentPredicate
- Record Components:
pages--title-generation-resolved-
- All Implemented Interfaces:
ComponentSubPredicate<WrittenBookContentComponent>,ItemSubPredicate
public record WrittenBookContentPredicate(Optional<CollectionPredicate<RawFilteredPair<Text>,WrittenBookContentPredicate.RawTextPredicate>> pages, Optional<String> author, Optional<String> title, NumberRange.IntRange generation, Optional<Boolean> resolved)
extends Record
implements ComponentSubPredicate<WrittenBookContentComponent>
- Mappings:
Namespace Name named net/minecraft/predicate/item/WrittenBookContentPredicateintermediary net/minecraft/class_9663official cynamed pagesintermediary comp_2642official cnamed authorintermediary comp_2643official dnamed titleintermediary comp_2644official enamed generationintermediary comp_2645official fnamed resolvedintermediary comp_2646official g
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordNested classes/interfaces inherited from interface net.minecraft.predicate.item.ItemSubPredicate
ItemSubPredicate.Type<T extends ItemSubPredicate> -
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for theauthorrecord component.static final com.mojang.serialization.Codec<WrittenBookContentPredicate> private final NumberRange.IntRangeThe field for thegenerationrecord component.private final Optional<CollectionPredicate<RawFilteredPair<Text>, WrittenBookContentPredicate.RawTextPredicate>> The field for thepagesrecord component.The field for theresolvedrecord component.The field for thetitlerecord component.Fields inherited from interface net.minecraft.predicate.item.ItemSubPredicate
PREDICATES_MAP_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionWrittenBookContentPredicate(Optional<CollectionPredicate<RawFilteredPair<Text>, WrittenBookContentPredicate.RawTextPredicate>> optional, Optional<String> optional2, Optional<String> optional3, NumberRange.IntRange intRange, Optional<Boolean> optional4) -
Method Summary
Modifier and TypeMethodDescriptionauthor()Returns the value of theauthorrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thegenerationrecord component.final inthashCode()Returns a hash code value for this object.pages()Returns the value of thepagesrecord component.resolved()Returns the value of theresolvedrecord component.booleantest(ItemStack itemStack, WrittenBookContentComponent writtenBookContentComponent) title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.predicate.item.ComponentSubPredicate
test
-
Field Details
-
pages
private final Optional<CollectionPredicate<RawFilteredPair<Text>,WrittenBookContentPredicate.RawTextPredicate>> pagesThe field for thepagesrecord component. -
author
The field for theauthorrecord component. -
title
The field for thetitlerecord component. -
generation
The field for thegenerationrecord component. -
resolved
The field for theresolvedrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/predicate/item/WrittenBookContentPredicate;CODEC:Lcom/mojang/serialization/Codec;intermediary field_51400Lnet/minecraft/class_9663;field_51400:Lcom/mojang/serialization/Codec;official aLcy;a:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
WrittenBookContentPredicate
public WrittenBookContentPredicate(Optional<CollectionPredicate<RawFilteredPair<Text>, WrittenBookContentPredicate.RawTextPredicate>> optional, Optional<String> optional2, Optional<String> optional3, NumberRange.IntRange intRange, Optional<Boolean> optional4)
-
-
Method Details
-
getComponentType
- Specified by:
getComponentTypein interfaceComponentSubPredicate<WrittenBookContentComponent>- Mappings:
Namespace Name Mixin selector named getComponentTypeLnet/minecraft/predicate/item/ComponentSubPredicate;getComponentType()Lnet/minecraft/component/ComponentType;intermediary method_58163Lnet/minecraft/class_9365;method_58163()Lnet/minecraft/class_9331;official aLdw;a()Lkp;
-
test
- Specified by:
testin interfaceComponentSubPredicate<WrittenBookContentComponent>- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/item/WrittenBookContentPredicate;test(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/type/WrittenBookContentComponent;)Zintermediary method_59697Lnet/minecraft/class_9663;method_59697(Lnet/minecraft/class_1799;Lnet/minecraft/class_9302;)Zofficial aLcy;a(Lcuq;Lcyb;)Z
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
pages
public Optional<CollectionPredicate<RawFilteredPair<Text>,WrittenBookContentPredicate.RawTextPredicate>> pages()Returns the value of thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
generation
Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-
resolved
Returns the value of theresolvedrecord component.- Returns:
- the value of the
resolvedrecord component
-