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
  • Field Details

    • entityId

      private final int entityId
      The field for the entityId record component.
    • pos

      private final BlockPos pos
      The field for the pos record component.
    • goals

      private final List<GoalDebugPayload.DebugGoal> goals
      The field for the goals record component.
    • ID

      public static final ResourceLocation ID
  • Constructor Details

    • GoalDebugPayload

      public GoalDebugPayload(FriendlyByteBuf p_295257_)
    • GoalDebugPayload

      public GoalDebugPayload(int entityId, BlockPos pos, List<GoalDebugPayload.DebugGoal> goals)
      Creates an instance of a GoalDebugPayload record class.
      Parameters:
      entityId - the value for the entityId record component
      pos - the value for the pos record component
      goals - the value for the goals record component
  • Method Details

    • write

      public void write(FriendlyByteBuf p_295543_)
      Specified by:
      write in interface CustomPacketPayload
    • id

      public ResourceLocation id()
      Specified by:
      id in interface CustomPacketPayload
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • entityId

      public int entityId()
      Returns the value of the entityId record component.
      Returns:
      the value of the entityId record component
    • pos

      public BlockPos pos()
      Returns the value of the pos record component.
      Returns:
      the value of the pos record component
    • goals

      Returns the value of the goals record component.
      Returns:
      the value of the goals record component