Record Class PathfindingDebugPayload
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.custom.PathfindingDebugPayload
- All Implemented Interfaces:
CustomPacketPayload
public record PathfindingDebugPayload(int entityId, Path path, float maxNodeDistance)
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 theentityId
record component.private final float
The field for themaxNodeDistance
record component.private final Path
The field for thepath
record component.static final StreamCodec
<FriendlyByteBuf, PathfindingDebugPayload> static final CustomPacketPayload.Type
<PathfindingDebugPayload> -
Constructor Summary
ModifierConstructorDescriptionPathfindingDebugPayload
(int entityId, Path path, float maxNodeDistance) Creates an instance of aPathfindingDebugPayload
record class.private
PathfindingDebugPayload
(FriendlyByteBuf p_296445_) -
Method Summary
Modifier and TypeMethodDescriptionint
entityId()
Returns the value of theentityId
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.float
Returns the value of themaxNodeDistance
record component.path()
Returns the value of thepath
record component.final String
toString()
Returns a string representation of this record class.type()
private void
write
(FriendlyByteBuf p_295342_)
-
Field Details
-
entityId
private final int entityIdThe field for theentityId
record component. -
path
The field for thepath
record component. -
maxNodeDistance
private final float maxNodeDistanceThe field for themaxNodeDistance
record component. -
STREAM_CODEC
-
TYPE
-
-
Constructor Details
-
PathfindingDebugPayload
-
PathfindingDebugPayload
Creates an instance of aPathfindingDebugPayload
record class.- Parameters:
entityId
- the value for theentityId
record componentpath
- the value for thepath
record componentmaxNodeDistance
- the value for themaxNodeDistance
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 '=='. -
entityId
public int entityId()Returns the value of theentityId
record component.- Returns:
- the value of the
entityId
record component
-
path
Returns the value of thepath
record component.- Returns:
- the value of the
path
record component
-
maxNodeDistance
public float maxNodeDistance()Returns the value of themaxNodeDistance
record component.- Returns:
- the value of the
maxNodeDistance
record component
-