Record Class Message
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.messageinabottle.message.Message
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationstatic final net.minecraft.resources.ResourceLocationstatic final com.mojang.serialization.Codec<Message> static final Messagestatic final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf, Message> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.resources.ResourceLocationReturns the value of thebackgroundrecord component.net.minecraft.resources.ResourceLocationReturns the value of thedimensionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.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
-
BACKGROUND_OVERWORLD
public static final net.minecraft.resources.ResourceLocation BACKGROUND_OVERWORLD -
BACKGROUND_NETHER
public static final net.minecraft.resources.ResourceLocation BACKGROUND_NETHER -
BACKGROUND_END
public static final net.minecraft.resources.ResourceLocation BACKGROUND_END -
DEFAULT
-
CODEC
-
STREAM_CODEC
public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,Message> STREAM_CODEC
-
-
Constructor Details
-
Message
public Message(UUID sender, String senderDisplayName, List<String> text, net.minecraft.resources.ResourceLocation dimension, net.minecraft.resources.ResourceLocation background) Creates an instance of aMessagerecord class.- Parameters:
sender- the value for thesenderrecord componentsenderDisplayName- the value for thesenderDisplayNamerecord componenttext- the value for thetextrecord componentdimension- the value for thedimensionrecord componentbackground- the value for thebackgroundrecord 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). -
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
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
dimension
public net.minecraft.resources.ResourceLocation dimension()Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
background
public net.minecraft.resources.ResourceLocation background()Returns the value of thebackgroundrecord component.- Returns:
- the value of the
backgroundrecord component
-