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 dcm$anamed messageintermediary comp_5144official e
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TextThe field for themessagerecord component.static final PlayerEntity.SleepFailureReasonstatic final PlayerEntity.SleepFailureReasonstatic final PlayerEntity.SleepFailureReasonstatic final PlayerEntity.SleepFailureReason -
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.@Nullable Textmessage()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. -
TOO_FAR_AWAY
- Mappings:
Namespace Name Mixin selector named TOO_FAR_AWAYLnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;TOO_FAR_AWAY:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;intermediary field_7530Lnet/minecraft/class_1657$class_1658;field_7530:Lnet/minecraft/class_1657$class_1658;official aLdcm$a;a:Ldcm$a;
-
OBSTRUCTED
- Mappings:
Namespace Name Mixin selector named OBSTRUCTEDLnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;OBSTRUCTED:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;intermediary field_18592Lnet/minecraft/class_1657$class_1658;field_18592:Lnet/minecraft/class_1657$class_1658;official bLdcm$a;b:Ldcm$a;
-
OTHER
- Mappings:
Namespace Name Mixin selector named OTHERLnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;OTHER:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;intermediary field_7531Lnet/minecraft/class_1657$class_1658;field_7531:Lnet/minecraft/class_1657$class_1658;official cLdcm$a;c:Ldcm$a;
-
NOT_SAFE
- Mappings:
Namespace Name Mixin selector named NOT_SAFELnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;NOT_SAFE:Lnet/minecraft/entity/player/PlayerEntity$SleepFailureReason;intermediary field_7532Lnet/minecraft/class_1657$class_1658;field_7532:Lnet/minecraft/class_1657$class_1658;official dLdcm$a;d:Ldcm$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 aLdcm$a;a()Lyh;
-