Record Class DecoratedContents

java.lang.Object
java.lang.Record
net.minecraft.network.message.DecoratedContents
Record Components:
plain -
decorated -

public record DecoratedContents(String plain, Text decorated) extends Record
A pair of the decorated message content and its undecorated ("plain") message content. Note that the two contents can be equal if no decoration is applied.
Mappings:
Namespace Name
official ri
intermediary net/minecraft/class_7634
named net/minecraft/network/message/DecoratedContents
official a
intermediary comp_963
named plain
official b
intermediary comp_964
named decorated
  • Field Details

    • plain

      private final String plain
      The field for the plain record component.
    • decorated

      private final Text decorated
      The field for the decorated record component.
  • Constructor Details

    • DecoratedContents

      public DecoratedContents(String content)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lri;<init>(Ljava/lang/String;)V
      intermediary <init> Lnet/minecraft/class_7634;<init>(Ljava/lang/String;)V
      named <init> Lnet/minecraft/network/message/DecoratedContents;<init>(Ljava/lang/String;)V
    • DecoratedContents

      public DecoratedContents(String string, Text decorated)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lri;<init>(Ljava/lang/String;Lrq;)V
      intermediary <init> Lnet/minecraft/class_7634;<init>(Ljava/lang/String;Lnet/minecraft/class_2561;)V
      named <init> Lnet/minecraft/network/message/DecoratedContents;<init>(Ljava/lang/String;Lnet/minecraft/text/Text;)V
  • Method Details

    • isDecorated

      public boolean isDecorated()
      Mappings:
      Namespace Name Mixin selector
      official a Lri;a()Z
      intermediary method_44973 Lnet/minecraft/class_7634;method_44973()Z
      named isDecorated Lnet/minecraft/network/message/DecoratedContents;isDecorated()Z
    • read

      public static DecoratedContents read(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official a Lri;a(Lqx;)Lri;
      intermediary method_44977 Lnet/minecraft/class_7634;method_44977(Lnet/minecraft/class_2540;)Lnet/minecraft/class_7634;
      named read Lnet/minecraft/network/message/DecoratedContents;read(Lnet/minecraft/network/PacketByteBuf;)Lnet/minecraft/network/message/DecoratedContents;
    • write

      public static void write(PacketByteBuf buf, DecoratedContents contents)
      Mappings:
      Namespace Name Mixin selector
      official a Lri;a(Lqx;Lri;)V
      intermediary method_44978 Lnet/minecraft/class_7634;method_44978(Lnet/minecraft/class_2540;Lnet/minecraft/class_7634;)V
      named write Lnet/minecraft/network/message/DecoratedContents;write(Lnet/minecraft/network/PacketByteBuf;Lnet/minecraft/network/message/DecoratedContents;)V
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • plain

      public String plain()
      Returns the value of the plain record component.
      Returns:
      the value of the plain record component
    • decorated

      public Text decorated()
      Returns the value of the decorated record component.
      Returns:
      the value of the decorated record component