Record Class GoalDebugPayload
java.lang.Object
java.lang.Record
net.minecraft.network.protocol.common.custom.GoalDebugPayload
- All Implemented Interfaces:
CustomPacketPayload
public record GoalDebugPayload(int entityId, BlockPos pos, List<GoalDebugPayload.DebugGoal> goals)
extends Record
implements CustomPacketPayload
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intThe field for theentityIdrecord component.private final List<GoalDebugPayload.DebugGoal>The field for thegoalsrecord component.static final ResourceLocationprivate final BlockPosThe field for theposrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionGoalDebugPayload(int entityId, BlockPos pos, List<GoalDebugPayload.DebugGoal> goals) Creates an instance of aGoalDebugPayloadrecord class.GoalDebugPayload(FriendlyByteBuf p_300481_) -
Method Summary
Modifier and TypeMethodDescriptionintentityId()Returns the value of theentityIdrecord component.final booleanIndicates whether some other object is "equal to" this one.goals()Returns the value of thegoalsrecord component.final inthashCode()Returns a hash code value for this object.id()pos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.voidwrite(FriendlyByteBuf p_297279_)
-
Field Details
-
entityId
private final int entityIdThe field for theentityIdrecord component. -
pos
The field for theposrecord component. -
goals
The field for thegoalsrecord component. -
ID
-
-
Constructor Details
-
GoalDebugPayload
-
GoalDebugPayload
Creates an instance of aGoalDebugPayloadrecord class.- Parameters:
entityId- the value for theentityIdrecord componentpos- the value for theposrecord componentgoals- the value for thegoalsrecord component
-
-
Method Details
-
write
- Specified by:
writein interfaceCustomPacketPayload
-
id
- Specified by:
idin 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
-
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-
goals
Returns the value of thegoalsrecord component.- Returns:
- the value of the
goalsrecord component
-