Record Class TeraBossActionRaidStrategy.TeraBossAction
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.battles.raids.tera.strategy.TeraBossActionRaidStrategy.TeraBossAction
- Enclosing class:
TeraBossActionRaidStrategy
public static record TeraBossActionRaidStrategy.TeraBossAction(TeraBossActionRaidStrategy.Trigger trigger, TeraBossActionRaidStrategy.Action action, float hpThreshold, int timeSeconds, int amount)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<TeraBossActionRaidStrategy.TeraBossAction> -
Constructor Summary
ConstructorsConstructorDescriptionTeraBossAction(TeraBossActionRaidStrategy.Trigger trigger, TeraBossActionRaidStrategy.Action action, float hpThreshold, int timeSeconds, int amount) Creates an instance of aTeraBossActionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.intamount()Returns the value of theamountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of thehpThresholdrecord component.voidrun(BattleParticipant boss) booleanshouldRun(BattleParticipant boss) intReturns the value of thetimeSecondsrecord component.final StringtoString()Returns a string representation of this record class.trigger()Returns the value of thetriggerrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
TeraBossAction
public TeraBossAction(TeraBossActionRaidStrategy.Trigger trigger, TeraBossActionRaidStrategy.Action action, float hpThreshold, int timeSeconds, int amount) Creates an instance of aTeraBossActionrecord class.- Parameters:
trigger- the value for thetriggerrecord componentaction- the value for theactionrecord componenthpThreshold- the value for thehpThresholdrecord componenttimeSeconds- the value for thetimeSecondsrecord componentamount- the value for theamountrecord component
-
-
Method Details
-
shouldRun
-
run
-
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 '=='. -
trigger
Returns the value of thetriggerrecord component.- Returns:
- the value of the
triggerrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
hpThreshold
public float hpThreshold()Returns the value of thehpThresholdrecord component.- Returns:
- the value of the
hpThresholdrecord component
-
timeSeconds
public int timeSeconds()Returns the value of thetimeSecondsrecord component.- Returns:
- the value of the
timeSecondsrecord component
-
amount
public int amount()Returns the value of theamountrecord component.- Returns:
- the value of the
amountrecord component
-