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 aRaidAllyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaiMode()Returns the value of theaiModerecord component.booleanchild()Returns the value of thechildrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.skin()Returns the value of theskinrecord component.spec()Returns the value of thespecrecord component.final StringtoString()Returns a string representation of this record class.doubleweight()Returns the value of theweightrecord 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 aRaidAllyrecord class.- Parameters:
weight- the value for theweightrecord componentname- the value for thenamerecord componentskin- the value for theskinrecord componentaiMode- the value for theaiModerecord componentspec- the value for thespecrecord componentchild- the value for thechildrecord 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 theweightrecord component.- Returns:
- the value of the
weightrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
skin
Returns the value of theskinrecord component.- Returns:
- the value of the
skinrecord component
-
aiMode
Returns the value of theaiModerecord component.- Returns:
- the value of the
aiModerecord component
-
spec
Returns the value of thespecrecord component.- Returns:
- the value of the
specrecord component
-
child
public boolean child()Returns the value of thechildrecord component.- Returns:
- the value of the
childrecord component
-