Record Class RallyInfo
java.lang.Object
java.lang.Record
com.mrbysco.rallyhealth.RallyInfo
public record RallyInfo(long time, float damage, net.minecraft.resources.Identifier mob)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRallyInfo(long time, float damage, net.minecraft.resources.Identifier mob) Creates an instance of aRallyInforecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatdamage()Returns the value of thedamagerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.net.minecraft.resources.Identifiermob()Returns the value of themobrecord component.longtime()Returns the value of thetimerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
RallyInfo
public RallyInfo(long time, float damage, net.minecraft.resources.Identifier mob) Creates an instance of aRallyInforecord class.- Parameters:
time- the value for thetimerecord componentdamage- the value for thedamagerecord componentmob- the value for themobrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
time
public long time()Returns the value of thetimerecord component.- Returns:
- the value of the
timerecord component
-
damage
public float damage()Returns the value of thedamagerecord component.- Returns:
- the value of the
damagerecord component
-
mob
public net.minecraft.resources.Identifier mob()Returns the value of themobrecord component.- Returns:
- the value of the
mobrecord component
-