Record Class FuelType
java.lang.Object
java.lang.Record
com.lightning.northstar.contraption.FuelType
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FuelType.Builderbuilder()floatReturns the value of thecombustionEngineRpmrecord component.floatReturns the value of thecombustionEngineUserecord component.final booleanIndicates whether some other object is "equal to" this one.fluids()Returns the value of thefluidsrecord component.static FuelTypegetFuelType(net.minecraft.world.level.material.Fluid fluid) floatgjPerMb()Returns the value of thegjPerMbrecord component.final inthashCode()Returns a hash code value for this object.static voidrecacheFuels(net.minecraft.core.RegistryAccess registryAccess) booleansupports(net.minecraft.world.level.material.Fluid fluid) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
FuelType
public FuelType(List<String> fluids, float gjPerMb, float combustionEngineUse, float combustionEngineRpm) Creates an instance of aFuelTyperecord class.- Parameters:
fluids- the value for thefluidsrecord componentgjPerMb- the value for thegjPerMbrecord componentcombustionEngineUse- the value for thecombustionEngineUserecord componentcombustionEngineRpm- the value for thecombustionEngineRpmrecord component
-
-
Method Details
-
builder
-
recacheFuels
@Internal public static void recacheFuels(net.minecraft.core.RegistryAccess registryAccess) -
getFuelType
-
supports
public boolean supports(net.minecraft.world.level.material.Fluid fluid) -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
fluids
Returns the value of thefluidsrecord component.- Returns:
- the value of the
fluidsrecord component
-
gjPerMb
public float gjPerMb()Returns the value of thegjPerMbrecord component.- Returns:
- the value of the
gjPerMbrecord component
-
combustionEngineUse
public float combustionEngineUse()Returns the value of thecombustionEngineUserecord component.- Returns:
- the value of the
combustionEngineUserecord component
-
combustionEngineRpm
public float combustionEngineRpm()Returns the value of thecombustionEngineRpmrecord component.- Returns:
- the value of the
combustionEngineRpmrecord component
-