Record Class GameTestAddMarkerDebugPayload
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.custom.GameTestAddMarkerDebugPayload
- All Implemented Interfaces:
CustomPacketPayload
public record GameTestAddMarkerDebugPayload(BlockPos pos, int color, String text, int durationMs)
extends Record
implements CustomPacketPayload
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.network.protocol.common.custom.CustomPacketPayload
CustomPacketPayload.FallbackProvider<B extends FriendlyByteBuf>, CustomPacketPayload.Type<T extends CustomPacketPayload>, CustomPacketPayload.TypeAndCodec<B extends FriendlyByteBuf,T extends CustomPacketPayload> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for thecolorrecord component.private final intThe field for thedurationMsrecord component.private final BlockPosThe field for theposrecord component.static final StreamCodec<FriendlyByteBuf, GameTestAddMarkerDebugPayload> private final StringThe field for thetextrecord component.static final CustomPacketPayload.Type<GameTestAddMarkerDebugPayload> -
Constructor Summary
ConstructorsModifierConstructorDescriptionGameTestAddMarkerDebugPayload(BlockPos pos, int color, String text, int durationMs) Creates an instance of aGameTestAddMarkerDebugPayloadrecord class.privateGameTestAddMarkerDebugPayload(FriendlyByteBuf p_300441_) -
Method Summary
Modifier and TypeMethodDescriptionintcolor()Returns the value of thecolorrecord component.intReturns the value of thedurationMsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.pos()Returns the value of theposrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.type()private voidwrite(FriendlyByteBuf p_300444_)
-
Field Details
-
pos
The field for theposrecord component. -
color
private final int colorThe field for thecolorrecord component. -
text
The field for thetextrecord component. -
durationMs
private final int durationMsThe field for thedurationMsrecord component. -
STREAM_CODEC
-
TYPE
-
-
Constructor Details
-
GameTestAddMarkerDebugPayload
-
GameTestAddMarkerDebugPayload
Creates an instance of aGameTestAddMarkerDebugPayloadrecord class.- Parameters:
pos- the value for theposrecord componentcolor- the value for thecolorrecord componenttext- the value for thetextrecord componentdurationMs- the value for thedurationMsrecord component
-
-
Method Details
-
write
-
type
- Specified by:
typein interfaceCustomPacketPayload
-
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 '=='. -
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
color
public int color()Returns the value of thecolorrecord component.- Returns:
- the value of the
colorrecord component
-
text
Returns the value of thetextrecord component.- Returns:
- the value of the
textrecord component
-
durationMs
public int durationMs()Returns the value of thedurationMsrecord component.- Returns:
- the value of the
durationMsrecord component
-