Record Class PlayerTextObjectContents

java.lang.Object
java.lang.Record
net.minecraft.text.object.PlayerTextObjectContents
Record Components:
player -
hat -
All Implemented Interfaces:
TextObjectContents

public record PlayerTextObjectContents(ProfileComponent player, boolean hat) extends Record implements TextObjectContents
Mappings:
Namespace Name
named net/minecraft/text/object/PlayerTextObjectContents
intermediary net/minecraft/class_11885
official zr
named player
intermediary comp_4763
official b
named hat
intermediary comp_4764
official c
  • Field Details

    • player

      private final ProfileComponent player
      The field for the player record component.
    • hat

      private final boolean hat
      The field for the hat record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<PlayerTextObjectContents> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/text/object/PlayerTextObjectContents;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_62500 Lnet/minecraft/class_11885;field_62500:Lcom/mojang/serialization/MapCodec;
      official a Lzr;a:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

    • PlayerTextObjectContents

      public PlayerTextObjectContents(ProfileComponent profileComponent, boolean bool)
  • Method Details

    • spriteSource

      public StyleSpriteSource spriteSource()
      Specified by:
      spriteSource in interface TextObjectContents
      Mappings:
      Namespace Name Mixin selector
      named spriteSource Lnet/minecraft/text/object/TextObjectContents;spriteSource()Lnet/minecraft/text/StyleSpriteSource;
      intermediary method_74068 Lnet/minecraft/class_11724;method_74068()Lnet/minecraft/class_11719;
      official b Lzp;b()Lyc;
    • asText

      public String asText()
      Specified by:
      asText in interface TextObjectContents
      Mappings:
      Namespace Name Mixin selector
      named asText Lnet/minecraft/text/object/TextObjectContents;asText()Ljava/lang/String;
      intermediary method_73178 Lnet/minecraft/class_11724;method_73178()Ljava/lang/String;
      official c Lzp;c()Ljava/lang/String;
    • getCodec

      public com.mojang.serialization.MapCodec<PlayerTextObjectContents> getCodec()
      Specified by:
      getCodec in interface TextObjectContents
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/text/object/TextObjectContents;getCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_74067 Lnet/minecraft/class_11724;method_74067()Lcom/mojang/serialization/MapCodec;
      official a Lzp;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.
    • player

      public ProfileComponent player()
      Returns the value of the player record component.
      Returns:
      the value of the player record component
    • hat

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