Record Class RaidAlly

java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.ally.RaidAlly
Record Components:
weight - The weight of the ally.
name - The name of the ally.
skin - The skin of the ally.
aiMode - The AI mode of the ally.
spec - The specification of the Pokemon.
child - Whether the ally is a child.

public record RaidAlly(double weight, String name, ResourceWithFallback skin, BattleAIMode aiMode, String spec, boolean child) extends Record
Represents an ally that can spawn in a raid den.
  • Field Details

    • CODEC

      public static final com.mojang.serialization.Codec<RaidAlly> CODEC
  • Constructor Details

    • RaidAlly

      public RaidAlly(double weight, String name, ResourceWithFallback skin, BattleAIMode aiMode, String spec, boolean child)
      Creates an instance of a RaidAlly record class.
      Parameters:
      weight - the value for the weight record component
      name - the value for the name record component
      skin - the value for the skin record component
      aiMode - the value for the aiMode record component
      spec - the value for the spec record component
      child - the value for the child record component
  • Method Details

    • specification

      public PokemonSpecification specification()
    • 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.
    • weight

      public double weight()
      Returns the value of the weight record component.
      Returns:
      the value of the weight record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • skin

      public ResourceWithFallback skin()
      Returns the value of the skin record component.
      Returns:
      the value of the skin record component
    • aiMode

      public BattleAIMode aiMode()
      Returns the value of the aiMode record component.
      Returns:
      the value of the aiMode record component
    • spec

      public String spec()
      Returns the value of the spec record component.
      Returns:
      the value of the spec record component
    • child

      public boolean child()
      Returns the value of the child record component.
      Returns:
      the value of the child record component