Record Class FlammablePowder
java.lang.Object
java.lang.Record
tech.anonymoushacker1279.immersiveweapons.item.gun.FlammablePowder
public record FlammablePowder(float consumeChance, float velocityModifier, int weaponDamageAmount, int dirtiness, boolean hasFlameTrail)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFlammablePowder(float consumeChance, float velocityModifier, int weaponDamageAmount, int dirtiness) FlammablePowder(float consumeChance, float velocityModifier, int weaponDamageAmount, int dirtiness, boolean hasFlameTrail) Creates an instance of aFlammablePowderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfloatReturns the value of theconsumeChancerecord component.intReturns the value of thedirtinessrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns the value of thehasFlameTrailrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.floatReturns the value of thevelocityModifierrecord component.intReturns the value of theweaponDamageAmountrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
FlammablePowder
public FlammablePowder(float consumeChance, float velocityModifier, int weaponDamageAmount, int dirtiness) -
FlammablePowder
public FlammablePowder(float consumeChance, float velocityModifier, int weaponDamageAmount, int dirtiness, boolean hasFlameTrail) Creates an instance of aFlammablePowderrecord class.- Parameters:
consumeChance- the value for theconsumeChancerecord componentvelocityModifier- the value for thevelocityModifierrecord componentweaponDamageAmount- the value for theweaponDamageAmountrecord componentdirtiness- the value for thedirtinessrecord componenthasFlameTrail- the value for thehasFlameTrailrecord component
-
-
Method Details
-
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 '=='. -
consumeChance
public float consumeChance()Returns the value of theconsumeChancerecord component.- Returns:
- the value of the
consumeChancerecord component
-
velocityModifier
public float velocityModifier()Returns the value of thevelocityModifierrecord component.- Returns:
- the value of the
velocityModifierrecord component
-
weaponDamageAmount
public int weaponDamageAmount()Returns the value of theweaponDamageAmountrecord component.- Returns:
- the value of the
weaponDamageAmountrecord component
-
dirtiness
public int dirtiness()Returns the value of thedirtinessrecord component.- Returns:
- the value of the
dirtinessrecord component
-
hasFlameTrail
public boolean hasFlameTrail()Returns the value of thehasFlameTrailrecord component.- Returns:
- the value of the
hasFlameTrailrecord component
-