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 ClassesNested 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 List<GoalDebugPayload.DebugGoal> The field for thegoalsrecord component.private final BlockPosThe field for theposrecord component.static final StreamCodec<FriendlyByteBuf, GoalDebugPayload> static final CustomPacketPayload.Type<GoalDebugPayload> -
Constructor Summary
ConstructorsModifierConstructorDescriptionGoalDebugPayload(int entityId, BlockPos pos, List<GoalDebugPayload.DebugGoal> goals) Creates an instance of aGoalDebugPayloadrecord class.privateGoalDebugPayload(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.pos()Returns the value of theposrecord component.final StringtoString()Returns a string representation of this record class.type()private 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. -
STREAM_CODEC
-
TYPE
-
-
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
-
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
-
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
-