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.ResourceLocationReturns 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.ResourceLocation 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
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
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.ResourceLocation dimension()Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
locked
public boolean locked()Returns the value of thelockedrecord component.- Returns:
- the value of the
lockedrecord component
-