Record Class PlainMessageDialogBody

java.lang.Object
java.lang.Record
net.minecraft.dialog.body.PlainMessageDialogBody
Record Components:
contents -
width -
All Implemented Interfaces:
DialogBody

public record PlainMessageDialogBody(Text contents, int width) extends Record implements DialogBody
Mappings:
Namespace Name
named net/minecraft/dialog/body/PlainMessageDialogBody
intermediary net/minecraft/class_11435
official asn
named contents
intermediary comp_4330
official f
named width
intermediary comp_4331
official g
  • Field Details

    • contents

      private final Text contents
      The field for the contents record component.
    • width

      private final int width
      The field for the width record component.
    • DEFAULT_WIDTH

      public static final int DEFAULT_WIDTH
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT_WIDTH Lnet/minecraft/dialog/body/PlainMessageDialogBody;DEFAULT_WIDTH:I
      intermediary field_60640 Lnet/minecraft/class_11435;field_60640:I
      official c Lasn;c:I
    • CODEC

      public static final com.mojang.serialization.MapCodec<PlainMessageDialogBody> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/dialog/body/PlainMessageDialogBody;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_60641 Lnet/minecraft/class_11435;field_60641:Lcom/mojang/serialization/MapCodec;
      official d Lasn;d:Lcom/mojang/serialization/MapCodec;
    • ALTERNATIVE_CODEC

      public static final com.mojang.serialization.Codec<PlainMessageDialogBody> ALTERNATIVE_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ALTERNATIVE_CODEC Lnet/minecraft/dialog/body/PlainMessageDialogBody;ALTERNATIVE_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_60642 Lnet/minecraft/class_11435;field_60642:Lcom/mojang/serialization/Codec;
      official e Lasn;e:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • PlainMessageDialogBody

      public PlainMessageDialogBody(Text text, int int2)
  • Method Details

    • getTypeCodec

      public com.mojang.serialization.MapCodec<PlainMessageDialogBody> getTypeCodec()
      Specified by:
      getTypeCodec in interface DialogBody
      Mappings:
      Namespace Name Mixin selector
      named getTypeCodec Lnet/minecraft/dialog/body/DialogBody;getTypeCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_71711 Lnet/minecraft/class_11432;method_71711()Lcom/mojang/serialization/MapCodec;
      official a Lask;a()Lcom/mojang/serialization/MapCodec;
    • 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.
    • contents

      public Text contents()
      Returns the value of the contents record component.
      Returns:
      the value of the contents record component
    • width

      public int width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component