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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRaidAlly
(double weight, String name, ResourceWithFallback skin, BattleAIMode aiMode, String spec, boolean child) Creates an instance of aRaidAlly
record class. -
Method Summary
Modifier and TypeMethodDescriptionaiMode()
Returns the value of theaiMode
record component.boolean
child()
Returns the value of thechild
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.skin()
Returns the value of theskin
record component.spec()
Returns the value of thespec
record component.final String
toString()
Returns a string representation of this record class.double
weight()
Returns the value of theweight
record component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
RaidAlly
public RaidAlly(double weight, String name, ResourceWithFallback skin, BattleAIMode aiMode, String spec, boolean child) Creates an instance of aRaidAlly
record class.- Parameters:
weight
- the value for theweight
record componentname
- the value for thename
record componentskin
- the value for theskin
record componentaiMode
- the value for theaiMode
record componentspec
- the value for thespec
record componentchild
- the value for thechild
record component
-
-
Method Details
-
specification
-
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 '=='. -
weight
public double weight()Returns the value of theweight
record component.- Returns:
- the value of the
weight
record component
-
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
skin
Returns the value of theskin
record component.- Returns:
- the value of the
skin
record component
-
aiMode
Returns the value of theaiMode
record component.- Returns:
- the value of the
aiMode
record component
-
spec
Returns the value of thespec
record component.- Returns:
- the value of the
spec
record component
-
child
public boolean child()Returns the value of thechild
record component.- Returns:
- the value of the
child
record component
-