Record Class MarkerBattleAnimationTime
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.api.battles.animation.schedule.time.MarkerBattleAnimationTime
- All Implemented Interfaces:
BattleAnimationTime
public record MarkerBattleAnimationTime(String marker)
extends Record
implements BattleAnimationTime
Timeline time that resolves from a named marker.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<MarkerBattleAnimationTime> Fields inherited from interface com.pixelmonmod.pixelmon.api.battles.animation.schedule.time.BattleAnimationTime
NONE, ZERO -
Constructor Summary
ConstructorsConstructorDescriptionMarkerBattleAnimationTime(String marker) Creates an instance of aMarkerBattleAnimationTimerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.marker()Returns the value of themarkerrecord component.intResolves this time against a marker map.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
MarkerBattleAnimationTime
Creates an instance of aMarkerBattleAnimationTimerecord class.- Parameters:
marker- the value for themarkerrecord component
-
-
Method Details
-
resolve
Description copied from interface:BattleAnimationTimeResolves this time against a marker map.- Specified by:
resolvein interfaceBattleAnimationTime- Parameters:
markers- the available timeline markers- Returns:
- the resolved tick, or
-1for no explicit time
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
marker
Returns the value of themarkerrecord component.- Returns:
- the value of the
markerrecord component
-