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.Identifierstatic final net.minecraft.resources.Identifierstatic final net.minecraft.resources.Identifierstatic 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.IdentifierReturns the value of thebackgroundrecord component.net.minecraft.resources.IdentifierReturns 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.Identifier BACKGROUND_OVERWORLD -
BACKGROUND_NETHER
public static final net.minecraft.resources.Identifier BACKGROUND_NETHER -
BACKGROUND_END
public static final net.minecraft.resources.Identifier 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.Identifier dimension, net.minecraft.resources.Identifier 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
-
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. 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
-
dimension
public net.minecraft.resources.Identifier dimension()Returns the value of thedimensionrecord component.- Returns:
- the value of the
dimensionrecord component
-
background
public net.minecraft.resources.Identifier background()Returns the value of thebackgroundrecord component.- Returns:
- the value of the
backgroundrecord component
-