Record Class BiomeModifiers.ChargeEntry
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.helper.BiomeModifiers.ChargeEntry
- Enclosing class:
BiomeModifiers
public static record BiomeModifiers.ChargeEntry(net.minecraft.world.entity.EntityType<?> type, double charge, double energyBudget)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BiomeModifiers.ChargeEntry> -
Constructor Summary
ConstructorsConstructorDescriptionChargeEntry(net.minecraft.world.entity.EntityType<?> type, double charge, double energyBudget) Creates an instance of aChargeEntryrecord 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.final StringtoString()Returns a string representation of this record class.net.minecraft.world.entity.EntityType<?> type()Returns the value of thetyperecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
ChargeEntry
public ChargeEntry(net.minecraft.world.entity.EntityType<?> type, double charge, double energyBudget) Creates an instance of aChargeEntryrecord class.- Parameters:
type- the value for thetyperecord componentcharge- the value for thechargerecord componentenergyBudget- the value for theenergyBudgetrecord 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. -
type
public net.minecraft.world.entity.EntityType<?> type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
charge
public double charge()Returns the value of thechargerecord component.- Returns:
- the value of the
chargerecord component
-
energyBudget
public double energyBudget()Returns the value of theenergyBudgetrecord component.- Returns:
- the value of the
energyBudgetrecord component
-