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 SummaryFieldsModifier and TypeFieldDescriptionprivate final intThe field for thecolorrecord component.private final intThe field for thedurationMsrecord component.static final ResourceLocationprivate final BlockPosThe field for theposrecord component.private final StringThe field for thetextrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionGameTestAddMarkerDebugPayload(BlockPos pos, int color, String text, int durationMs) Creates an instance of aGameTestAddMarkerDebugPayloadrecord class.GameTestAddMarkerDebugPayload(FriendlyByteBuf p_294353_) 
- 
Method SummaryModifier 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.id()pos()Returns the value of theposrecord component.text()Returns the value of thetextrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_294856_) 
- 
Field Details- 
posThe field for theposrecord component.
- 
colorprivate final int colorThe field for thecolorrecord component.
- 
textThe field for thetextrecord component.
- 
durationMsprivate final int durationMsThe field for thedurationMsrecord component.
- 
ID
 
- 
- 
Constructor Details- 
GameTestAddMarkerDebugPayload
- 
GameTestAddMarkerDebugPayloadCreates an instance of aGameTestAddMarkerDebugPayloadrecord class.- Parameters:
- pos- the value for the- posrecord component
- color- the value for the- colorrecord component
- text- the value for the- textrecord component
- durationMs- the value for the- durationMsrecord component
 
 
- 
- 
Method Details- 
write- Specified by:
- writein interface- CustomPacketPayload
 
- 
id- Specified by:
- idin interface- CustomPacketPayload
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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 '=='.
- 
posReturns the value of theposrecord component.- Returns:
- the value of the posrecord component
 
- 
colorpublic int color()Returns the value of thecolorrecord component.- Returns:
- the value of the colorrecord component
 
- 
textReturns the value of thetextrecord component.- Returns:
- the value of the textrecord component
 
- 
durationMspublic int durationMs()Returns the value of thedurationMsrecord component.- Returns:
- the value of the durationMsrecord component
 
 
-