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/WrittenBookContentPredicate
intermediary net/minecraft/class_9663
official da
named pages
intermediary comp_2642
official c
named author
intermediary comp_2643
official d
named title
intermediary comp_2644
official e
named generation
intermediary comp_2645
official f
named resolved
intermediary comp_2646
official g
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
Nested classes/interfaces inherited from interface net.minecraft.predicate.item.ItemSubPredicate
ItemSubPredicate.Type<T extends ItemSubPredicate>
-
Field Summary
Modifier and TypeFieldDescriptionThe field for theauthor
record component.static final com.mojang.serialization.Codec
<WrittenBookContentPredicate> private final NumberRange.IntRange
The field for thegeneration
record component.private final Optional
<CollectionPredicate<RawFilteredPair<Text>, WrittenBookContentPredicate.RawTextPredicate>> The field for thepages
record component.The field for theresolved
record component.The field for thetitle
record component.Fields inherited from interface net.minecraft.predicate.item.ItemSubPredicate
PREDICATES_MAP_CODEC
-
Constructor Summary
ConstructorDescriptionWrittenBookContentPredicate
(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 theauthor
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thegeneration
record component.final int
hashCode()
Returns a hash code value for this object.pages()
Returns the value of thepages
record component.resolved()
Returns the value of theresolved
record component.boolean
test
(ItemStack itemStack, WrittenBookContentComponent writtenBookContentComponent) title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.predicate.item.ComponentSubPredicate
test
-
Field Details
-
pages
private final Optional<CollectionPredicate<RawFilteredPair<Text>,WrittenBookContentPredicate.RawTextPredicate>> pagesThe field for thepages
record component. -
author
The field for theauthor
record component. -
title
The field for thetitle
record component. -
generation
The field for thegeneration
record component. -
resolved
The field for theresolved
record component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/predicate/item/WrittenBookContentPredicate;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_51400
Lnet/minecraft/class_9663;field_51400:Lcom/mojang/serialization/Codec;
official a
Lda;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:
getComponentType
in interfaceComponentSubPredicate<WrittenBookContentComponent>
- Mappings:
Namespace Name Mixin selector named getComponentType
Lnet/minecraft/predicate/item/ComponentSubPredicate;getComponentType()Lnet/minecraft/component/ComponentType;
intermediary method_58163
Lnet/minecraft/class_9365;method_58163()Lnet/minecraft/class_9331;
official a
Ldz;a()Lkt;
-
test
- Specified by:
test
in interfaceComponentSubPredicate<WrittenBookContentComponent>
- Mappings:
Namespace Name Mixin selector named test
Lnet/minecraft/predicate/item/WrittenBookContentPredicate;test(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/type/WrittenBookContentComponent;)Z
intermediary method_59697
Lnet/minecraft/class_9663;method_59697(Lnet/minecraft/class_1799;Lnet/minecraft/class_9302;)Z
official a
Lda;a(Lcxo;Ldaw;)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 thepages
record component.- Returns:
- the value of the
pages
record component
-
author
Returns the value of theauthor
record component.- Returns:
- the value of the
author
record component
-
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
generation
Returns the value of thegeneration
record component.- Returns:
- the value of the
generation
record component
-
resolved
Returns the value of theresolved
record component.- Returns:
- the value of the
resolved
record component
-