Record Class PlayerEntity.SleepFailureReason

java.lang.Object
java.lang.Record
net.minecraft.entity.player.PlayerEntity.SleepFailureReason
Record Components:
message -
Enclosing class:
PlayerEntity

public static record PlayerEntity.SleepFailureReason(@Nullable Text message) extends Record
A reason why a player cannot start sleeping.
Mappings:
Namespace Name
named net/minecraft/entity/player/PlayerEntity$SleepFailureReason
intermediary net/minecraft/class_1657$class_1658
official dcb$a
named message
intermediary comp_5144
official e
  • Field Details

    • message

      @Nullable private final @Nullable Text message
      The field for the message record component.
    • field_7530

      public static final PlayerEntity.SleepFailureReason field_7530
      Mappings:
      Namespace Name Mixin selector
      named field_7530 Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;field_7530:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;
      intermediary field_7530 Lnet/minecraft/class_1657$class_1658;field_7530:Lnet/minecraft/class_1657$class_1658;
      official a Ldcb$a;a:Ldcb$a;
    • field_18592

      public static final PlayerEntity.SleepFailureReason field_18592
      Mappings:
      Namespace Name Mixin selector
      named field_18592 Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;field_18592:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;
      intermediary field_18592 Lnet/minecraft/class_1657$class_1658;field_18592:Lnet/minecraft/class_1657$class_1658;
      official b Ldcb$a;b:Ldcb$a;
    • field_7531

      public static final PlayerEntity.SleepFailureReason field_7531
      Mappings:
      Namespace Name Mixin selector
      named field_7531 Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;field_7531:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;
      intermediary field_7531 Lnet/minecraft/class_1657$class_1658;field_7531:Lnet/minecraft/class_1657$class_1658;
      official c Ldcb$a;c:Ldcb$a;
    • field_7532

      public static final PlayerEntity.SleepFailureReason field_7532
      Mappings:
      Namespace Name Mixin selector
      named field_7532 Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;field_7532:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;
      intermediary field_7532 Lnet/minecraft/class_1657$class_1658;field_7532:Lnet/minecraft/class_1657$class_1658;
      official d Ldcb$a;d:Ldcb$a;
  • Constructor Details

    • SleepFailureReason

      public SleepFailureReason(@Nullable @Nullable Text message)
      Creates an instance of a SleepFailureReason record class.
      Parameters:
      message - the value for the message record component
  • Method Details

    • 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.
    • message

      @Nullable public @Nullable Text message()
      Returns the action bar message that is sent to the player when sleeping fails with this reason.
      Returns:
      the message, or null if none is sent for this reason
      Mappings:
      Namespace Name Mixin selector
      named message Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;message()Lnet/minecraft/text/Text;
      intermediary comp_5144 Lnet/minecraft/class_1657$class_1658;comp_5144()Lnet/minecraft/class_2561;
      official a Ldcb$a;a()Lym;