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-
public record WrittenBookContentComponent(RawFilteredPair<String> title, String author, int generation, List<RawFilteredPair<Text>> pages, boolean resolved)
extends Record
- Mappings:
Namespace Name official cuvintermediary net/minecraft/class_9302named net/minecraft/component/type/WrittenBookContentComponentofficial iintermediary comp_2419named titleofficial jintermediary comp_2420named authorofficial kintermediary comp_2421named generationofficial lintermediary comp_2422named pagesofficial mintermediary comp_2423named resolved
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theauthorrecord component.static final com.mojang.serialization.Codec<WrittenBookContentComponent> static final intprivate final intThe field for thegenerationrecord component.static final intstatic final intstatic final intstatic final intstatic final PacketCodec<RegistryByteBuf, WrittenBookContentComponent> private static final com.mojang.serialization.Codec<RawFilteredPair<Text>> private final List<RawFilteredPair<Text>> The field for thepagesrecord component.private 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()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()Returns the value of thepagesrecord component.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.
-
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. -
MAX_SERIALIZED_PAGE_LENGTH
public static final int MAX_SERIALIZED_PAGE_LENGTH- See Also:
- Mappings:
Namespace Name Mixin selector official aLcuv;a: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 bLcuv;b: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 cLcuv;c: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 dLcuv;d: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 eLcuv;e: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 fLcuv;f: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 nLcuv;n: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 oLcuv;o: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 gLcuv;g: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 hLcuv;h:Lyg;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
-
copy
- Mappings:
Namespace Name Mixin selector official aLcuv;a()Lcuv;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 aLcuv;a(Ldv;Lcka;)Lcuv;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 bLcuv;b()Lcuv;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 aLcuv;a(Ldv;Lcka;Laql;)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 aLcuv;a(Lwi;Lip$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 aLcuv;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;
-
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
Returns the value of thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
resolved
public boolean resolved()Returns the value of theresolvedrecord component.- Returns:
- the value of the
resolvedrecord component
-