Record Class WritableBookContentComponent

java.lang.Object
java.lang.Record
net.minecraft.component.type.WritableBookContentComponent
Record Components:
pages -
All Implemented Interfaces:
BookContent<String,WritableBookContentComponent>

public record WritableBookContentComponent(List<RawFilteredPair<String>> pages) extends Record implements BookContent<String,WritableBookContentComponent>
Mappings:
Namespace Name
named net/minecraft/component/type/WritableBookContentComponent
intermediary net/minecraft/class_9301
official cxy
named pages
intermediary comp_2418
official g
  • Field Details

    • pages

      private final List<RawFilteredPair<String>> pages
      The field for the pages record component.
    • DEFAULT

      public static final WritableBookContentComponent DEFAULT
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT Lnet/minecraft/component/type/WritableBookContentComponent;DEFAULT:Lnet/minecraft/component/type/WritableBookContentComponent;
      intermediary field_49369 Lnet/minecraft/class_9301;field_49369:Lnet/minecraft/class_9301;
      official a Lcxy;a:Lcxy;
    • MAX_PAGE_LENGTH

      public static final int MAX_PAGE_LENGTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_PAGE_LENGTH Lnet/minecraft/component/type/WritableBookContentComponent;MAX_PAGE_LENGTH:I
      intermediary field_49370 Lnet/minecraft/class_9301;field_49370:I
      official b Lcxy;b:I
    • MAX_PAGE_COUNT

      public static final int MAX_PAGE_COUNT
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named MAX_PAGE_COUNT Lnet/minecraft/component/type/WritableBookContentComponent;MAX_PAGE_COUNT:I
      intermediary field_51411 Lnet/minecraft/class_9301;field_51411:I
      official c Lcxy;c:I
    • PAGE_CODEC

      private static final com.mojang.serialization.Codec<RawFilteredPair<String>> PAGE_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PAGE_CODEC Lnet/minecraft/component/type/WritableBookContentComponent;PAGE_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49373 Lnet/minecraft/class_9301;field_49373:Lcom/mojang/serialization/Codec;
      official h Lcxy;h:Lcom/mojang/serialization/Codec;
    • PAGES_CODEC

      public static final com.mojang.serialization.Codec<List<RawFilteredPair<String>>> PAGES_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PAGES_CODEC Lnet/minecraft/component/type/WritableBookContentComponent;PAGES_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49374 Lnet/minecraft/class_9301;field_49374:Lcom/mojang/serialization/Codec;
      official d Lcxy;d:Lcom/mojang/serialization/Codec;
    • CODEC

      public static final com.mojang.serialization.Codec<WritableBookContentComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/WritableBookContentComponent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49371 Lnet/minecraft/class_9301;field_49371:Lcom/mojang/serialization/Codec;
      official e Lcxy;e:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<ByteBuf,WritableBookContentComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/WritableBookContentComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49372 Lnet/minecraft/class_9301;field_49372:Lnet/minecraft/class_9139;
      official f Lcxy;f:Lzn;
  • Constructor Details

    • WritableBookContentComponent

      public WritableBookContentComponent(List<RawFilteredPair<String>> pages)
      Creates an instance of a WritableBookContentComponent record class.
      Parameters:
      pages - the value for the pages record component
  • Method Details

    • stream

      public Stream<String> stream(boolean shouldFilter)
      Mappings:
      Namespace Name Mixin selector
      named stream Lnet/minecraft/component/type/WritableBookContentComponent;stream(Z)Ljava/util/stream/Stream;
      intermediary method_57517 Lnet/minecraft/class_9301;method_57517(Z)Ljava/util/stream/Stream;
      official a Lcxy;a(Z)Ljava/util/stream/Stream;
    • withPages

      Specified by:
      withPages in interface BookContent<String,WritableBookContentComponent>
      Mappings:
      Namespace Name Mixin selector
      named withPages Lnet/minecraft/component/type/WritableBookContentComponent;withPages(Ljava/util/List;)Lnet/minecraft/component/type/WritableBookContentComponent;
      intermediary method_58187 Lnet/minecraft/class_9301;method_58187(Ljava/util/List;)Lnet/minecraft/class_9301;
      official b Lcxy;b(Ljava/util/List;)Lcxy;
    • 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 o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • pages

      public List<RawFilteredPair<String>> pages()
      Returns the value of the pages record component.
      Specified by:
      pages in interface BookContent<String,WritableBookContentComponent>
      Returns:
      the value of the pages record component