Record Class LetterItem.Message
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.secretnotes.LetterItem.Message
- Enclosing class:
LetterItem
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<LetterItem.Message> static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, LetterItem.Message> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.IdentifierReturns the value of thedimensionrecord component.static LetterItem.Messageempty()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.lock()booleanlocked()Returns the value of thelockedrecord component.sender()Returns the value of thesenderrecord component.Returns the value of thesenderDisplayNamerecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, LetterItem.Message> STREAM_CODEC
-
-
Constructor Details
-
Message
public Message(UUID sender, String senderDisplayName, net.minecraft.resources.Identifier dimension, List<String> text, boolean locked) Creates an instance of aMessagerecord class.- Parameters:
sender- the value for thesenderrecord componentsenderDisplayName- the value for thesenderDisplayNamerecord componentdimension- the value for thedimensionrecord componenttext- the value for thetextrecord componentlocked- the value for thelockedrecord component
-
-
Method Details
-
empty
-
lock
-
toString
-
hashCode
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sender
Returns the value of thesenderrecord component.- Returns:
- the value of the
senderrecord component
-
senderDisplayName
Returns the value of thesenderDisplayNamerecord component.- Returns:
- the value of the
senderDisplayNamerecord component
-
dimension
public net.minecraft.resources.Identifier dimension()Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
text
-
locked
public boolean locked()Returns the value of thelockedrecord component.- Returns:
- the value of the
lockedrecord component
-