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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for theentityId
record component.static final ResourceLocation
private final float
The field for themaxNodeDistance
record component.private final Path
The field for thepath
record component. -
Constructor Summary
ConstructorDescriptionPathfindingDebugPayload
(int entityId, Path path, float maxNodeDistance) Creates an instance of aPathfindingDebugPayload
record class.PathfindingDebugPayload
(FriendlyByteBuf p_297728_) -
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.id()
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.void
write
(FriendlyByteBuf p_298780_)
-
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. -
ID
-
-
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
- 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 '=='. -
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
-