Package net.minecraft.entity.player
Record Class PlayerEntity.SleepFailureReason
java.lang.Object
java.lang.Record
net.minecraft.entity.player.PlayerEntity.SleepFailureReason
- Record Components:
message-
- Enclosing class:
PlayerEntity
A reason why a player cannot start sleeping.
- Mappings:
Namespace Name named net/minecraft/entity/player/PlayerEntity$SleepFailureReasonintermediary net/minecraft/class_1657$class_1658official dcb$anamed messageintermediary comp_5144official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PlayerEntity.SleepFailureReasonstatic final PlayerEntity.SleepFailureReasonstatic final PlayerEntity.SleepFailureReasonstatic final PlayerEntity.SleepFailureReasonThe field for themessagerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSleepFailureReason(@Nullable Text message) Creates an instance of aSleepFailureReasonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the action bar message that is sent to the player when sleeping fails with this reason.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
message
The field for themessagerecord component. -
field_7530
- Mappings:
Namespace Name Mixin selector named field_7530Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;field_7530:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;intermediary field_7530Lnet/minecraft/class_1657$class_1658;field_7530:Lnet/minecraft/class_1657$class_1658;official aLdcb$a;a:Ldcb$a;
-
field_18592
- Mappings:
Namespace Name Mixin selector named field_18592Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;field_18592:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;intermediary field_18592Lnet/minecraft/class_1657$class_1658;field_18592:Lnet/minecraft/class_1657$class_1658;official bLdcb$a;b:Ldcb$a;
-
field_7531
- Mappings:
Namespace Name Mixin selector named field_7531Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;field_7531:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;intermediary field_7531Lnet/minecraft/class_1657$class_1658;field_7531:Lnet/minecraft/class_1657$class_1658;official cLdcb$a;c:Ldcb$a;
-
field_7532
- Mappings:
Namespace Name Mixin selector named field_7532Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;field_7532:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;intermediary field_7532Lnet/minecraft/class_1657$class_1658;field_7532:Lnet/minecraft/class_1657$class_1658;official dLdcb$a;d:Ldcb$a;
-
-
Constructor Details
-
SleepFailureReason
Creates an instance of aSleepFailureReasonrecord class.- Parameters:
message- the value for themessagerecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
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 messageLnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;message()Lnet/minecraft/text/Text;intermediary comp_5144Lnet/minecraft/class_1657$class_1658;comp_5144()Lnet/minecraft/class_2561;official aLdcb$a;a()Lym;
-