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
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theentityIdrecord component.private final floatThe field for themaxNodeDistancerecord component.private final PathThe field for thepathrecord component.static final StreamCodec<FriendlyByteBuf, PathfindingDebugPayload> static final CustomPacketPayload.Type<PathfindingDebugPayload> -
Constructor Summary
ConstructorsModifierConstructorDescriptionPathfindingDebugPayload(int entityId, Path path, float maxNodeDistance) Creates an instance of aPathfindingDebugPayloadrecord class.privatePathfindingDebugPayload(FriendlyByteBuf p_297728_) -
Method Summary
Modifier and TypeMethodDescriptionintentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of themaxNodeDistancerecord component.path()Returns the value of thepathrecord component.final StringtoString()Returns a string representation of this record class.type()private voidwrite(FriendlyByteBuf p_298780_)
-
Field Details
-
entityId
private final int entityIdThe field for theentityIdrecord component. -
path
The field for thepathrecord component. -
maxNodeDistance
private final float maxNodeDistanceThe field for themaxNodeDistancerecord component. -
STREAM_CODEC
-
TYPE
-
-
Constructor Details
-
PathfindingDebugPayload
-
PathfindingDebugPayload
Creates an instance of aPathfindingDebugPayloadrecord class.- Parameters:
entityId- the value for theentityIdrecord componentpath- the value for thepathrecord componentmaxNodeDistance- the value for themaxNodeDistancerecord component
-
-
Method Details
-
write
-
type
- Specified by:
typein 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 theentityIdrecord component.- Returns:
- the value of the
entityIdrecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
maxNodeDistance
public float maxNodeDistance()Returns the value of themaxNodeDistancerecord component.- Returns:
- the value of the
maxNodeDistancerecord component
-