Record Class WrittenBookContentComponent

java.lang.Object
java.lang.Record
net.minecraft.component.type.WrittenBookContentComponent
Record Components:
title -
author -
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
named net/minecraft/component/type/WrittenBookContentComponent
intermediary net/minecraft/class_9302
official cxl
named title
intermediary comp_2419
official k
named author
intermediary comp_2420
official l
named generation
intermediary comp_2421
official m
named pages
intermediary comp_2422
official n
named resolved
intermediary comp_2423
official o
  • Field Details

    • title

      private final RawFilteredPair<String> title
      The field for the title record component.
    • author

      private final String author
      The field for the author record component.
    • generation

      private final int generation
      The field for the generation record component.
    • pages

      private final List<RawFilteredPair<Text>> pages
      The field for the pages record component.
    • resolved

      private final boolean resolved
      The field for the resolved record component.
    • DEFAULT

      public static final WrittenBookContentComponent DEFAULT
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT Lnet/minecraft/component/type/WrittenBookContentComponent;DEFAULT:Lnet/minecraft/component/type/WrittenBookContentComponent;
      intermediary field_49829 Lnet/minecraft/class_9302;field_49829:Lnet/minecraft/class_9302;
      official a Lcxl;a:Lcxl;
    • MAX_SERIALIZED_PAGE_LENGTH

      public static final int MAX_SERIALIZED_PAGE_LENGTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_SERIALIZED_PAGE_LENGTH Lnet/minecraft/component/type/WrittenBookContentComponent;MAX_SERIALIZED_PAGE_LENGTH:I
      intermediary field_49375 Lnet/minecraft/class_9302;field_49375:I
      official b Lcxl;b:I
    • field_49377

      public static final int field_49377
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named field_49377 Lnet/minecraft/component/type/WrittenBookContentComponent;field_49377:I
      intermediary field_49377 Lnet/minecraft/class_9302;field_49377:I
      official c Lcxl;c:I
    • MAX_TITLE_LENGTH

      public static final int MAX_TITLE_LENGTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_TITLE_LENGTH Lnet/minecraft/component/type/WrittenBookContentComponent;MAX_TITLE_LENGTH:I
      intermediary field_49378 Lnet/minecraft/class_9302;field_49378:I
      official d Lcxl;d:I
    • MAX_GENERATION

      public static final int MAX_GENERATION
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_GENERATION Lnet/minecraft/component/type/WrittenBookContentComponent;MAX_GENERATION:I
      intermediary field_49379 Lnet/minecraft/class_9302;field_49379:I
      official e Lcxl;e:I
    • UNCOPIABLE_GENERATION

      public static final int UNCOPIABLE_GENERATION
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named UNCOPIABLE_GENERATION Lnet/minecraft/component/type/WrittenBookContentComponent;UNCOPIABLE_GENERATION:I
      intermediary field_49380 Lnet/minecraft/class_9302;field_49380:I
      official f Lcxl;f:I
    • PAGE_CODEC

      public static final com.mojang.serialization.Codec<Text> PAGE_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PAGE_CODEC Lnet/minecraft/component/type/WrittenBookContentComponent;PAGE_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49383 Lnet/minecraft/class_9302;field_49383:Lcom/mojang/serialization/Codec;
      official g Lcxl;g:Lcom/mojang/serialization/Codec;
    • PAGES_CODEC

      public static final com.mojang.serialization.Codec<List<RawFilteredPair<Text>>> PAGES_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PAGES_CODEC Lnet/minecraft/component/type/WrittenBookContentComponent;PAGES_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49384 Lnet/minecraft/class_9302;field_49384:Lcom/mojang/serialization/Codec;
      official h Lcxl;h:Lcom/mojang/serialization/Codec;
    • CODEC

      public static final com.mojang.serialization.Codec<WrittenBookContentComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/WrittenBookContentComponent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49381 Lnet/minecraft/class_9302;field_49381:Lcom/mojang/serialization/Codec;
      official i Lcxl;i:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,WrittenBookContentComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/WrittenBookContentComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49382 Lnet/minecraft/class_9302;field_49382:Lnet/minecraft/class_9139;
      official j Lcxl;j:Lys;
  • Constructor Details

  • Method Details

    • createPageCodec

      private static com.mojang.serialization.Codec<RawFilteredPair<Text>> createPageCodec(com.mojang.serialization.Codec<Text> textCodec)
      Mappings:
      Namespace Name Mixin selector
      named createPageCodec Lnet/minecraft/component/type/WrittenBookContentComponent;createPageCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      intermediary method_58437 Lnet/minecraft/class_9302;method_58437(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      official b Lcxl;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 createPagesCodec Lnet/minecraft/component/type/WrittenBookContentComponent;createPagesCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      intermediary method_58436 Lnet/minecraft/class_9302;method_58436(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      official a Lcxl;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
    • copy

      Mappings:
      Namespace Name Mixin selector
      named copy Lnet/minecraft/component/type/WrittenBookContentComponent;copy()Lnet/minecraft/component/type/WrittenBookContentComponent;
      intermediary method_57519 Lnet/minecraft/class_9302;method_57519()Lnet/minecraft/class_9302;
      official b Lcxl;b()Lcxl;
    • resolve

      Mappings:
      Namespace Name Mixin selector
      named resolve Lnet/minecraft/component/type/WrittenBookContentComponent;resolve(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/component/type/WrittenBookContentComponent;
      intermediary method_57521 Lnet/minecraft/class_9302;method_57521(Lnet/minecraft/class_2168;Lnet/minecraft/class_1657;)Lnet/minecraft/class_9302;
      official a Lcxl;a(Leq;Lcml;)Lcxl;
    • asResolved

      public WrittenBookContentComponent asResolved()
      Mappings:
      Namespace Name Mixin selector
      named asResolved Lnet/minecraft/component/type/WrittenBookContentComponent;asResolved()Lnet/minecraft/component/type/WrittenBookContentComponent;
      intermediary method_57527 Lnet/minecraft/class_9302;method_57527()Lnet/minecraft/class_9302;
      official c Lcxl;c()Lcxl;
    • resolve

      Mappings:
      Namespace Name Mixin selector
      named resolve Lnet/minecraft/component/type/WrittenBookContentComponent;resolve(Lnet/minecraft/server/command/ServerCommandSource;Lnet/minecraft/entity/player/PlayerEntity;Lnet/minecraft/text/RawFilteredPair;)Ljava/util/Optional;
      intermediary method_57522 Lnet/minecraft/class_9302;method_57522(Lnet/minecraft/class_2168;Lnet/minecraft/class_1657;Lnet/minecraft/class_9262;)Ljava/util/Optional;
      official a Lcxl;a(Leq;Lcml;Lard;)Ljava/util/Optional;
    • exceedsSerializedLengthLimit

      private static boolean exceedsSerializedLengthLimit(Text text, RegistryWrapper.WrapperLookup lookup)
      Mappings:
      Namespace Name Mixin selector
      named exceedsSerializedLengthLimit Lnet/minecraft/component/type/WrittenBookContentComponent;exceedsSerializedLengthLimit(Lnet/minecraft/text/Text;Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;)Z
      intermediary method_57524 Lnet/minecraft/class_9302;method_57524(Lnet/minecraft/class_2561;Lnet/minecraft/class_7225$class_7874;)Z
      official a Lcxl;a(Lwu;Ljl$a;)Z
    • getPages

      public List<Text> getPages(boolean shouldFilter)
      Mappings:
      Namespace Name Mixin selector
      named getPages Lnet/minecraft/component/type/WrittenBookContentComponent;getPages(Z)Ljava/util/List;
      intermediary method_57525 Lnet/minecraft/class_9302;method_57525(Z)Ljava/util/List;
      official a Lcxl;a(Z)Ljava/util/List;
    • withPages

      Specified by:
      withPages in interface BookContent<Text,WrittenBookContentComponent>
      Mappings:
      Namespace Name Mixin selector
      named withPages Lnet/minecraft/component/type/WrittenBookContentComponent;withPages(Ljava/util/List;)Lnet/minecraft/component/type/WrittenBookContentComponent;
      intermediary method_58188 Lnet/minecraft/class_9302;method_58188(Ljava/util/List;)Lnet/minecraft/class_9302;
      official b Lcxl;b(Ljava/util/List;)Lcxl;
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • title

      public RawFilteredPair<String> title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • author

      public String author()
      Returns the value of the author record component.
      Returns:
      the value of the author record component
    • generation

      public int generation()
      Returns the value of the generation record component.
      Returns:
      the value of the generation record component
    • pages

      public List<RawFilteredPair<Text>> pages()
      Returns the value of the pages record component.
      Specified by:
      pages in interface BookContent<Text,WrittenBookContentComponent>
      Returns:
      the value of the pages record component
    • resolved

      public boolean resolved()
      Returns the value of the resolved record component.
      Returns:
      the value of the resolved record component