Record Class ClientboundDebugSamplePacket
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundDebugSamplePacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public record ClientboundDebugSamplePacket(long[] sample, RemoteDebugSampleType debugSampleType)
extends Record
implements Packet<ClientGamePacketListener>
-
Field Summary
Modifier and TypeFieldDescriptionprivate final RemoteDebugSampleType
The field for thedebugSampleType
record component.private final long[]
The field for thesample
record component.static final StreamCodec
<FriendlyByteBuf, ClientboundDebugSamplePacket> -
Constructor Summary
ModifierConstructorDescriptionClientboundDebugSamplePacket
(long[] sample, RemoteDebugSampleType debugSampleType) Creates an instance of aClientboundDebugSamplePacket
record class.private
ClientboundDebugSamplePacket
(FriendlyByteBuf p_323529_) -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedebugSampleType
record component.final boolean
Indicates whether some other object is "equal to" this one.void
handle
(ClientGamePacketListener p_324120_) final int
hashCode()
Returns a hash code value for this object.long[]
sample()
Returns the value of thesample
record component.final String
toString()
Returns a string representation of this record class.type()
private void
write
(FriendlyByteBuf p_324126_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
sample
private final long[] sampleThe field for thesample
record component. -
debugSampleType
The field for thedebugSampleType
record component. -
STREAM_CODEC
-
-
Constructor Details
-
ClientboundDebugSamplePacket
-
ClientboundDebugSamplePacket
Creates an instance of aClientboundDebugSamplePacket
record class.- Parameters:
sample
- the value for thesample
record componentdebugSampleType
- the value for thedebugSampleType
record component
-
-
Method Details
-
write
-
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
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. All components in this record class are compared withObjects::equals(Object,Object)
. -
sample
public long[] sample()Returns the value of thesample
record component.- Returns:
- the value of the
sample
record component
-
debugSampleType
Returns the value of thedebugSampleType
record component.- Returns:
- the value of the
debugSampleType
record component
-