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
-
Field Summary
Modifier and TypeFieldDescriptionprivate final int
The field for theentityId
record component.private final List<GoalDebugPayload.DebugGoal>
The field for thegoals
record component.static final ResourceLocation
private final BlockPos
The field for thepos
record component. -
Constructor Summary
ConstructorDescriptionGoalDebugPayload
(int entityId, BlockPos pos, List<GoalDebugPayload.DebugGoal> goals) Creates an instance of aGoalDebugPayload
record class.GoalDebugPayload
(FriendlyByteBuf p_300481_) -
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.goals()
Returns the value of thegoals
record component.final int
hashCode()
Returns a hash code value for this object.id()
pos()
Returns the value of thepos
record component.final String
toString()
Returns a string representation of this record class.void
write
(FriendlyByteBuf p_297279_)
-
Field Details
-
entityId
private final int entityIdThe field for theentityId
record component. -
pos
The field for thepos
record component. -
goals
The field for thegoals
record component. -
ID
-
-
Constructor Details
-
GoalDebugPayload
-
GoalDebugPayload
Creates an instance of aGoalDebugPayload
record class.- Parameters:
entityId
- the value for theentityId
record componentpos
- the value for thepos
record componentgoals
- the value for thegoals
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
-
pos
Returns the value of thepos
record component.- Returns:
- the value of the
pos
record component
-
goals
Returns the value of thegoals
record component.- Returns:
- the value of the
goals
record component
-