Package net.minecraft.component.type
Record Class WrittenBookContentComponent
java.lang.Object
java.lang.Record
net.minecraft.component.type.WrittenBookContentComponent
- Record Components:
title--generation-pages-resolved-
- All Implemented Interfaces:
BookContent<Text,WrittenBookContentComponent>
public record WrittenBookContentComponent(RawFilteredPair<String> title, String author, int generation, List<RawFilteredPair<Text>> pages, boolean resolved)
extends Record
implements BookContent<Text,WrittenBookContentComponent>
- Mappings:
Namespace Name official cyaintermediary net/minecraft/class_9302named net/minecraft/component/type/WrittenBookContentComponentofficial lintermediary comp_2419named titleofficial mintermediary comp_2420named authorofficial nintermediary comp_2421named generationofficial ointermediary comp_2422named pagesofficial pintermediary comp_2423named resolved
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theauthorrecord component.static final com.mojang.serialization.Codec<WrittenBookContentComponent> static final WrittenBookContentComponentstatic final intprivate final intThe field for thegenerationrecord component.static final intstatic final intstatic final intstatic final intstatic final PacketCodec<RegistryByteBuf, WrittenBookContentComponent> static final com.mojang.serialization.Codec<Text> private final List<RawFilteredPair<Text>> The field for thepagesrecord component.static final com.mojang.serialization.Codec<List<RawFilteredPair<Text>>> private final booleanThe field for theresolvedrecord component.private final RawFilteredPair<String> The field for thetitlerecord component.static final int -
Constructor Summary
ConstructorsConstructorDescriptionWrittenBookContentComponent(RawFilteredPair<String> rawFilteredPair, String string, int int2, List<RawFilteredPair<Text>> list, boolean bool) -
Method Summary
Modifier and TypeMethodDescriptionauthor()Returns the value of theauthorrecord component.copy()private static com.mojang.serialization.Codec<RawFilteredPair<Text>> createPageCodec(com.mojang.serialization.Codec<Text> textCodec) static com.mojang.serialization.Codec<List<RawFilteredPair<Text>>> createPagesCodec(com.mojang.serialization.Codec<Text> textCodec) final booleanIndicates whether some other object is "equal to" this one.private static booleanexceedsSerializedLengthLimit(Text text, RegistryWrapper.WrapperLookup lookup) intReturns the value of thegenerationrecord component.getPages(boolean shouldFilter) final inthashCode()Returns a hash code value for this object.pages()resolve(ServerCommandSource source, @Nullable PlayerEntity player) private static Optional<RawFilteredPair<Text>> resolve(ServerCommandSource source, @Nullable PlayerEntity player, RawFilteredPair<Text> page) booleanresolved()Returns the value of theresolvedrecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.withPages(List<RawFilteredPair<Text>> list)
-
Field Details
-
title
The field for thetitlerecord component. -
author
The field for theauthorrecord component. -
generation
private final int generationThe field for thegenerationrecord component. -
pages
The field for thepagesrecord component. -
resolved
private final boolean resolvedThe field for theresolvedrecord component. -
DEFAULT
- Mappings:
Namespace Name Mixin selector official aLcya;a:Lcya;intermediary field_49829Lnet/minecraft/class_9302;field_49829:Lnet/minecraft/class_9302;named DEFAULTLnet/minecraft/component/type/WrittenBookContentComponent;DEFAULT:Lnet/minecraft/component/type/WrittenBookContentComponent;
-
MAX_SERIALIZED_PAGE_LENGTH
public static final int MAX_SERIALIZED_PAGE_LENGTH- See Also:
- Mappings:
Namespace Name Mixin selector official bLcya;b:Iintermediary field_49375Lnet/minecraft/class_9302;field_49375:Inamed MAX_SERIALIZED_PAGE_LENGTHLnet/minecraft/component/type/WrittenBookContentComponent;MAX_SERIALIZED_PAGE_LENGTH:I
-
MAX_PAGE_COUNT
public static final int MAX_PAGE_COUNT- See Also:
- Mappings:
Namespace Name Mixin selector official cLcya;c:Iintermediary field_49376Lnet/minecraft/class_9302;field_49376:Inamed MAX_PAGE_COUNTLnet/minecraft/component/type/WrittenBookContentComponent;MAX_PAGE_COUNT:I
-
field_49377
public static final int field_49377- See Also:
- Mappings:
Namespace Name Mixin selector official dLcya;d:Iintermediary field_49377Lnet/minecraft/class_9302;field_49377:Inamed field_49377Lnet/minecraft/component/type/WrittenBookContentComponent;field_49377:I
-
MAX_TITLE_LENGTH
public static final int MAX_TITLE_LENGTH- See Also:
- Mappings:
Namespace Name Mixin selector official eLcya;e:Iintermediary field_49378Lnet/minecraft/class_9302;field_49378:Inamed MAX_TITLE_LENGTHLnet/minecraft/component/type/WrittenBookContentComponent;MAX_TITLE_LENGTH:I
-
MAX_GENERATION
public static final int MAX_GENERATION- See Also:
- Mappings:
Namespace Name Mixin selector official fLcya;f:Iintermediary field_49379Lnet/minecraft/class_9302;field_49379:Inamed MAX_GENERATIONLnet/minecraft/component/type/WrittenBookContentComponent;MAX_GENERATION:I
-
UNCOPIABLE_GENERATION
public static final int UNCOPIABLE_GENERATION- See Also:
- Mappings:
Namespace Name Mixin selector official gLcya;g:Iintermediary field_49380Lnet/minecraft/class_9302;field_49380:Inamed UNCOPIABLE_GENERATIONLnet/minecraft/component/type/WrittenBookContentComponent;UNCOPIABLE_GENERATION:I
-
PAGE_CODEC
- Mappings:
Namespace Name Mixin selector official hLcya;h:Lcom/mojang/serialization/Codec;intermediary field_49383Lnet/minecraft/class_9302;field_49383:Lcom/mojang/serialization/Codec;named PAGE_CODECLnet/minecraft/component/type/WrittenBookContentComponent;PAGE_CODEC:Lcom/mojang/serialization/Codec;
-
PAGES_CODEC
- Mappings:
Namespace Name Mixin selector official iLcya;i:Lcom/mojang/serialization/Codec;intermediary field_49384Lnet/minecraft/class_9302;field_49384:Lcom/mojang/serialization/Codec;named PAGES_CODECLnet/minecraft/component/type/WrittenBookContentComponent;PAGES_CODEC:Lcom/mojang/serialization/Codec;
-
CODEC
- Mappings:
Namespace Name Mixin selector official jLcya;j:Lcom/mojang/serialization/Codec;intermediary field_49381Lnet/minecraft/class_9302;field_49381:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/component/type/WrittenBookContentComponent;CODEC:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector official kLcya;k:Lzc;intermediary field_49382Lnet/minecraft/class_9302;field_49382:Lnet/minecraft/class_9139;named PACKET_CODECLnet/minecraft/component/type/WrittenBookContentComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
-
Constructor Details
-
WrittenBookContentComponent
public WrittenBookContentComponent(RawFilteredPair<String> rawFilteredPair, String string, int int2, List<RawFilteredPair<Text>> list, boolean bool)
-
-
Method Details
-
createPageCodec
private static com.mojang.serialization.Codec<RawFilteredPair<Text>> createPageCodec(com.mojang.serialization.Codec<Text> textCodec) - Mappings:
Namespace Name Mixin selector official bLcya;b(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;intermediary method_58437Lnet/minecraft/class_9302;method_58437(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;named createPageCodecLnet/minecraft/component/type/WrittenBookContentComponent;createPageCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
createPagesCodec
public static com.mojang.serialization.Codec<List<RawFilteredPair<Text>>> createPagesCodec(com.mojang.serialization.Codec<Text> textCodec) - Mappings:
Namespace Name Mixin selector official aLcya;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;intermediary method_58436Lnet/minecraft/class_9302;method_58436(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;named createPagesCodecLnet/minecraft/component/type/WrittenBookContentComponent;createPagesCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
copy
- Mappings:
Namespace Name Mixin selector official bLcya;b()Lcya;intermediary method_57519Lnet/minecraft/class_9302;method_57519()Lnet/minecraft/class_9302;named copyLnet/minecraft/component/type/WrittenBookContentComponent;copy()Lnet/minecraft/component/type/WrittenBookContentComponent;
-
resolve
@Nullable public @Nullable WrittenBookContentComponent resolve(ServerCommandSource source, @Nullable @Nullable PlayerEntity player) - Mappings:
Namespace Name Mixin selector official aLcya;a(Leh;Lcly;)Lcya;intermediary method_57521Lnet/minecraft/class_9302;method_57521(Lnet/minecraft/class_2168;Lnet/minecraft/class_1657;)Lnet/minecraft/class_9302;named resolveLnet/minecraft/component/type/WrittenBookContentComponent;resolve(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/component/type/WrittenBookContentComponent;
-
asResolved
- Mappings:
Namespace Name Mixin selector official cLcya;c()Lcya;intermediary method_57527Lnet/minecraft/class_9302;method_57527()Lnet/minecraft/class_9302;named asResolvedLnet/minecraft/component/type/WrittenBookContentComponent;asResolved()Lnet/minecraft/component/type/WrittenBookContentComponent;
-
resolve
private static Optional<RawFilteredPair<Text>> resolve(ServerCommandSource source, @Nullable @Nullable PlayerEntity player, RawFilteredPair<Text> page) - Mappings:
Namespace Name Mixin selector official aLcya;a(Leh;Lcly;Lark;)Ljava/util/Optional;intermediary method_57522Lnet/minecraft/class_9302;method_57522(Lnet/minecraft/class_2168;Lnet/minecraft/class_1657;Lnet/minecraft/class_9262;)Ljava/util/Optional;named resolveLnet/minecraft/component/type/WrittenBookContentComponent;resolve(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/text/RawFilteredPair;)Ljava/util/Optional;
-
exceedsSerializedLengthLimit
private static boolean exceedsSerializedLengthLimit(Text text, RegistryWrapper.WrapperLookup lookup) - Mappings:
Namespace Name Mixin selector official aLcya;a(Lxe;Ljc$a;)Zintermediary method_57524Lnet/minecraft/class_9302;method_57524(Lnet/minecraft/class_2561;Lnet/minecraft/class_7225$class_7874;)Znamed exceedsSerializedLengthLimitLnet/minecraft/component/type/WrittenBookContentComponent;exceedsSerializedLengthLimit(Lnet/minecraft/text/Text;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Z
-
getPages
- Mappings:
Namespace Name Mixin selector official aLcya;a(Z)Ljava/util/List;intermediary method_57525Lnet/minecraft/class_9302;method_57525(Z)Ljava/util/List;named getPagesLnet/minecraft/component/type/WrittenBookContentComponent;getPages(Z)Ljava/util/List;
-
withPages
- Specified by:
withPagesin interfaceBookContent<Text,WrittenBookContentComponent> - Mappings:
Namespace Name Mixin selector official bLcya;b(Ljava/util/List;)Lcya;intermediary method_58188Lnet/minecraft/class_9302;method_58188(Ljava/util/List;)Lnet/minecraft/class_9302;named withPagesLnet/minecraft/component/type/WrittenBookContentComponent;withPages(Ljava/util/List;)Lnet/minecraft/component/type/WrittenBookContentComponent;
-
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 '=='. -
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
author
Returns the value of theauthorrecord component.- Returns:
- the value of the
authorrecord component
-
generation
public int generation()Returns the value of thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-
pages
- Specified by:
pagesin interfaceBookContent<Text,WrittenBookContentComponent> - Mappings:
Namespace Name Mixin selector official aLcxc;a()Ljava/util/List;intermediary comp_2422Lnet/minecraft/class_9364;comp_2422()Ljava/util/List;named pagesLnet/minecraft/component/type/BookContent;pages()Ljava/util/List;
-
resolved
public boolean resolved()Returns the value of theresolvedrecord component.- Returns:
- the value of the
resolvedrecord component
-