Package dev.twilite.game.wrapper
Record Class Hitmark
java.lang.Object
java.lang.Record
dev.twilite.game.wrapper.Hitmark
- Record Components:
type- hitmark type iddamage- displayed damage amountexpiryCycle- client cycle associated with the hitmark expiry
A visible hitmark on an actor.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionHitmark(int type, int damage, int expiryCycle) Creates an instance of aHitmarkrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncategory()intdamage()Returns the value of thedamagerecord component.final booleanIndicates whether some other object is "equal to" this one.intReturns the value of theexpiryCyclerecord component.final inthashCode()Returns a hash code value for this object.booleanmine()Returns whether this hitmark is one of the local-player damage/block categories.booleanothers()Returns whether this hitmark is one of the other-player damage/block categories.intReturns remaining game ticks until this hitmark cycle expires.final StringtoString()Returns a string representation of this record class.inttype()Returns the value of thetyperecord component.
-
Constructor Details
-
Hitmark
public Hitmark(int type, int damage, int expiryCycle) Creates an instance of aHitmarkrecord class.- Parameters:
type- the value for thetyperecord componentdamage- the value for thedamagerecord componentexpiryCycle- the value for theexpiryCyclerecord component
-
-
Method Details
-
category
-
remaining
public int remaining()Returns remaining game ticks until this hitmark cycle expires. -
mine
public boolean mine()Returns whether this hitmark is one of the local-player damage/block categories. -
others
public boolean others()Returns whether this hitmark is one of the other-player damage/block categories. -
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 with '=='. -
type
public int type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
damage
public int damage()Returns the value of thedamagerecord component.- Returns:
- the value of the
damagerecord component
-
expiryCycle
public int expiryCycle()Returns the value of theexpiryCyclerecord component.- Returns:
- the value of the
expiryCyclerecord component
-