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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for thecolor
record component.private final int
The field for thedurationMs
record component.static final ResourceLocation
private final BlockPos
The field for thepos
record component.private final String
The field for thetext
record component. -
Constructor Summary
ConstructorDescriptionGameTestAddMarkerDebugPayload
(BlockPos pos, int color, String text, int durationMs) Creates an instance of aGameTestAddMarkerDebugPayload
record class.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.id()
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.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. -
ID
-
-
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
- Specified by:
write
in interfaceCustomPacketPayload
-
id
- Specified by:
id
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
-