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> TooltipAppender
public record WrittenBookContentComponent(RawFilteredPair<String> title, String author, int generation, List<RawFilteredPair<Text>> pages, boolean resolved)
extends Record
implements BookContent<Text,WrittenBookContentComponent>, TooltipAppender
- Mappings:
Namespace Name named net/minecraft/component/type/WrittenBookContentComponentintermediary net/minecraft/class_9302official ddunamed titleintermediary comp_2419official knamed authorintermediary comp_2420official lnamed generationintermediary comp_2421official mnamed pagesintermediary comp_2422official nnamed resolvedintermediary comp_2423official o
-
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 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 TypeMethodDescriptionvoidappendTooltip(Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type, ComponentsAccess components) author()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 registries) 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.static booleanresolveInStack(ItemStack stack, ServerCommandSource commandSource, @Nullable PlayerEntity player) 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 named DEFAULTLnet/minecraft/component/type/WrittenBookContentComponent;DEFAULT:Lnet/minecraft/component/type/WrittenBookContentComponent;intermediary field_49829Lnet/minecraft/class_9302;field_49829:Lnet/minecraft/class_9302;official aLddu;a:Lddu;
-
MAX_SERIALIZED_PAGE_LENGTH
public static final int MAX_SERIALIZED_PAGE_LENGTH- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_SERIALIZED_PAGE_LENGTHLnet/minecraft/component/type/WrittenBookContentComponent;MAX_SERIALIZED_PAGE_LENGTH:Iintermediary field_49375Lnet/minecraft/class_9302;field_49375:Iofficial bLddu;b:I
-
field_49377
public static final int field_49377- See Also:
- Mappings:
Namespace Name Mixin selector named field_49377Lnet/minecraft/component/type/WrittenBookContentComponent;field_49377:Iintermediary field_49377Lnet/minecraft/class_9302;field_49377:Iofficial cLddu;c:I
-
MAX_TITLE_LENGTH
public static final int MAX_TITLE_LENGTH- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_TITLE_LENGTHLnet/minecraft/component/type/WrittenBookContentComponent;MAX_TITLE_LENGTH:Iintermediary field_49378Lnet/minecraft/class_9302;field_49378:Iofficial dLddu;d:I
-
MAX_GENERATION
public static final int MAX_GENERATION- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_GENERATIONLnet/minecraft/component/type/WrittenBookContentComponent;MAX_GENERATION:Iintermediary field_49379Lnet/minecraft/class_9302;field_49379:Iofficial eLddu;e:I
-
UNCOPIABLE_GENERATION
public static final int UNCOPIABLE_GENERATION- See Also:
- Mappings:
Namespace Name Mixin selector named UNCOPIABLE_GENERATIONLnet/minecraft/component/type/WrittenBookContentComponent;UNCOPIABLE_GENERATION:Iintermediary field_49380Lnet/minecraft/class_9302;field_49380:Iofficial fLddu;f:I
-
PAGE_CODEC
- Mappings:
Namespace Name Mixin selector named PAGE_CODECLnet/minecraft/component/type/WrittenBookContentComponent;PAGE_CODEC:Lcom/mojang/serialization/Codec;intermediary field_49383Lnet/minecraft/class_9302;field_49383:Lcom/mojang/serialization/Codec;official gLddu;g:Lcom/mojang/serialization/Codec;
-
PAGES_CODEC
- Mappings:
Namespace Name Mixin selector named PAGES_CODECLnet/minecraft/component/type/WrittenBookContentComponent;PAGES_CODEC:Lcom/mojang/serialization/Codec;intermediary field_49384Lnet/minecraft/class_9302;field_49384:Lcom/mojang/serialization/Codec;official hLddu;h:Lcom/mojang/serialization/Codec;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/component/type/WrittenBookContentComponent;CODEC:Lcom/mojang/serialization/Codec;intermediary field_49381Lnet/minecraft/class_9302;field_49381:Lcom/mojang/serialization/Codec;official iLddu;i:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/component/type/WrittenBookContentComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_49382Lnet/minecraft/class_9302;field_49382:Lnet/minecraft/class_9139;official jLddu;j:Lze;
-
-
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 named createPageCodecLnet/minecraft/component/type/WrittenBookContentComponent;createPageCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;intermediary method_58437Lnet/minecraft/class_9302;method_58437(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;official bLddu;b(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 named createPagesCodecLnet/minecraft/component/type/WrittenBookContentComponent;createPagesCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;intermediary method_58436Lnet/minecraft/class_9302;method_58436(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;official aLddu;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
-
copy
- Mappings:
Namespace Name Mixin selector named copyLnet/minecraft/component/type/WrittenBookContentComponent;copy()Lnet/minecraft/component/type/WrittenBookContentComponent;intermediary method_57519Lnet/minecraft/class_9302;method_57519()Lnet/minecraft/class_9302;official bLddu;b()Lddu;
-
resolveInStack
public static boolean resolveInStack(ItemStack stack, ServerCommandSource commandSource, @Nullable @Nullable PlayerEntity player) - Mappings:
Namespace Name Mixin selector named resolveInStackLnet/minecraft/component/type/WrittenBookContentComponent;resolveInStack(Lnet/minecraft/item/ItemStack;Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/entity/player/PlayerEntity;)Zintermediary method_66337Lnet/minecraft/class_9302;method_66337(Lnet/minecraft/class_1799;Lnet/minecraft/class_2168;Lnet/minecraft/class_1657;)Zofficial aLddu;a(Ldak;Lek;Lcsi;)Z
-
resolve
@Nullable public @Nullable WrittenBookContentComponent resolve(ServerCommandSource source, @Nullable @Nullable PlayerEntity player) - Mappings:
Namespace Name Mixin selector named resolveLnet/minecraft/component/type/WrittenBookContentComponent;resolve(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/component/type/WrittenBookContentComponent;intermediary method_57521Lnet/minecraft/class_9302;method_57521(Lnet/minecraft/class_2168;Lnet/minecraft/class_1657;)Lnet/minecraft/class_9302;official aLddu;a(Lek;Lcsi;)Lddu;
-
asResolved
- Mappings:
Namespace Name Mixin selector named asResolvedLnet/minecraft/component/type/WrittenBookContentComponent;asResolved()Lnet/minecraft/component/type/WrittenBookContentComponent;intermediary method_57527Lnet/minecraft/class_9302;method_57527()Lnet/minecraft/class_9302;official cLddu;c()Lddu;
-
resolve
private static Optional<RawFilteredPair<Text>> resolve(ServerCommandSource source, @Nullable @Nullable PlayerEntity player, RawFilteredPair<Text> page) - Mappings:
Namespace Name Mixin selector named resolveLnet/minecraft/component/type/WrittenBookContentComponent;resolve(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/text/RawFilteredPair;)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;official aLddu;a(Lek;Lcsi;Last;)Ljava/util/Optional;
-
exceedsSerializedLengthLimit
private static boolean exceedsSerializedLengthLimit(Text text, RegistryWrapper.WrapperLookup registries) - Mappings:
Namespace Name Mixin selector named exceedsSerializedLengthLimitLnet/minecraft/component/type/WrittenBookContentComponent;exceedsSerializedLengthLimit(Lnet/minecraft/text/Text;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Zintermediary method_57524Lnet/minecraft/class_9302;method_57524(Lnet/minecraft/class_2561;Lnet/minecraft/class_7225$class_7874;)Zofficial aLddu;a(Lxg;Lji$a;)Z
-
getPages
- Mappings:
Namespace Name Mixin selector named getPagesLnet/minecraft/component/type/WrittenBookContentComponent;getPages(Z)Ljava/util/List;intermediary method_57525Lnet/minecraft/class_9302;method_57525(Z)Ljava/util/List;official aLddu;a(Z)Ljava/util/List;
-
withPages
- Specified by:
withPagesin interfaceBookContent<Text,WrittenBookContentComponent> - Mappings:
Namespace Name Mixin selector named withPagesLnet/minecraft/component/type/WrittenBookContentComponent;withPages(Ljava/util/List;)Lnet/minecraft/component/type/WrittenBookContentComponent;intermediary method_58188Lnet/minecraft/class_9302;method_58188(Ljava/util/List;)Lnet/minecraft/class_9302;official bLddu;b(Ljava/util/List;)Lddu;
-
appendTooltip
public void appendTooltip(Item.TooltipContext context, Consumer<Text> textConsumer, TooltipType type, ComponentsAccess components) - Specified by:
appendTooltipin interfaceTooltipAppender- Mappings:
Namespace Name Mixin selector named appendTooltipLnet/minecraft/item/tooltip/TooltipAppender;appendTooltip(Lnet/minecraft/item/Item$TooltipContext;Ljava/util/function/Consumer;Lnet/minecraft/item/tooltip/TooltipType;Lnet/minecraft/component/ComponentsAccess;)Vintermediary method_57409Lnet/minecraft/class_9299;method_57409(Lnet/minecraft/class_1792$class_9635;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;Lnet/minecraft/class_9473;)Vofficial aLddp;a(Ldag$b;Ljava/util/function/Consumer;Ldbz;Lkg;)V
-
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.- Specified by:
pagesin interfaceBookContent<Text,WrittenBookContentComponent> - Returns:
- the value of the
pagesrecord component
-
resolved
public boolean resolved()Returns the value of theresolvedrecord component.- Returns:
- the value of the
resolvedrecord component
-