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/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 List
<GoalDebugPayload.DebugGoal> The field for thegoals
record component.private final BlockPos
The field for thepos
record component.static final StreamCodec
<FriendlyByteBuf, GoalDebugPayload> static final CustomPacketPayload.Type
<GoalDebugPayload> -
Constructor Summary
ModifierConstructorDescriptionGoalDebugPayload
(int entityId, BlockPos pos, List<GoalDebugPayload.DebugGoal> goals) Creates an instance of aGoalDebugPayload
record class.private
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.pos()
Returns the value of thepos
record component.final String
toString()
Returns a string representation of this record class.type()
private 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. -
STREAM_CODEC
-
TYPE
-
-
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
-
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
-
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
-