Record Class SpawnCost
java.lang.Object
java.lang.Record
dev.wyck.wrapper.entity.data.SpawnCost
- Record Components:
charge- the amount of energy required to spawn the entityenergyBudget- the maximum amount of energy that can be used to spawn the entity
@NullMarked
@AsOf("2.3.0")
public record SpawnCost(double charge, double energyBudget)
extends Record
Represents the cost of spawning an entity.
- Since:
- 2.3.0
-
Constructor Summary
ConstructorsConstructorDescriptionSpawnCost(double charge, double energyBudget) Creates an instance of aSpawnCostrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublecharge()Returns the value of thechargerecord component.doubleReturns the value of theenergyBudgetrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SpawnCostof(double charge, double energyBudget) final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SpawnCost
public SpawnCost(double charge, double energyBudget) Creates an instance of aSpawnCostrecord class.- Parameters:
charge- the value for thechargerecord componentenergyBudget- the value for theenergyBudgetrecord component
-
-
Method Details
-
of
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
charge
-
energyBudget
public double energyBudget()Returns the value of theenergyBudgetrecord component.- Returns:
- the value of the
energyBudgetrecord component
-