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
Modifier and TypeFieldDescriptionprivate final int
The field for thecolor
record component.private final int
The field for thedurationMs
record component.private final BlockPos
The field for thepos
record component.static final StreamCodec
<FriendlyByteBuf, GameTestAddMarkerDebugPayload> private final String
The field for thetext
record component.static final CustomPacketPayload.Type
<GameTestAddMarkerDebugPayload> -
Constructor Summary
ModifierConstructorDescriptionGameTestAddMarkerDebugPayload
(BlockPos pos, int color, String text, int durationMs) Creates an instance of aGameTestAddMarkerDebugPayload
record class.private
GameTestAddMarkerDebugPayload
(FriendlyByteBuf p_300441_) -
Method Summary
Modifier and TypeMethodDescriptionint
color()
Returns the value of thecolor
record component.int
Returns the value of thedurationMs
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.pos()
Returns the value of thepos
record component.text()
Returns the value of thetext
record component.final String
toString()
Returns a string representation of this record class.type()
private void
write
(FriendlyByteBuf p_300444_)
-
Field Details
-
pos
The field for thepos
record component. -
color
private final int colorThe field for thecolor
record component. -
text
The field for thetext
record component. -
durationMs
private final int durationMsThe field for thedurationMs
record component. -
STREAM_CODEC
-
TYPE
-
-
Constructor Details
-
GameTestAddMarkerDebugPayload
-
GameTestAddMarkerDebugPayload
Creates an instance of aGameTestAddMarkerDebugPayload
record class.- Parameters:
pos
- the value for thepos
record componentcolor
- the value for thecolor
record componenttext
- the value for thetext
record componentdurationMs
- the value for thedurationMs
record component
-
-
Method Details
-
write
-
type
- Specified by:
type
in 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 thepos
record component.- Returns:
- the value of the
pos
record component
-
color
public int color()Returns the value of thecolor
record component.- Returns:
- the value of the
color
record component
-
text
Returns the value of thetext
record component.- Returns:
- the value of the
text
record component
-
durationMs
public int durationMs()Returns the value of thedurationMs
record component.- Returns:
- the value of the
durationMs
record component
-