Enum Class FuelRegistry
- All Implemented Interfaces:
Serializable,Comparable<FuelRegistry>,Constable,IFuelRegistry
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionvoidfloatgetBurnRateMultiplier(net.minecraft.world.level.Level world, net.minecraft.world.level.material.Fluid fluid) Get the burn rate of the given fluid.intgetFuelValue(net.minecraft.world.level.Level world, net.minecraft.world.level.material.Fluid fluid) Get the fuel value of the given fluid; this is defined as the amount of compressed air generated in a Liquid Compressor (without Speed Upgrades) by burning 1000mL of the fluid.static FuelRegistryCollection<net.minecraft.world.level.material.Fluid>registeredFuels(net.minecraft.world.level.Level world) Get all the known fuels which have been registered with the fuel registry.voidregisterHotFluid(net.minecraft.world.level.material.Fluid fluid, int mLPerBucket, float burnRateMultiplier) static FuelRegistryReturns the enum constant of this class with the specified name.static FuelRegistry[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
getInstance
-
registerHotFluid
public void registerHotFluid(net.minecraft.world.level.material.Fluid fluid, int mLPerBucket, float burnRateMultiplier) -
getFuelValue
public int getFuelValue(net.minecraft.world.level.Level world, net.minecraft.world.level.material.Fluid fluid) Description copied from interface:IFuelRegistryGet the fuel value of the given fluid; this is defined as the amount of compressed air generated in a Liquid Compressor (without Speed Upgrades) by burning 1000mL of the fluid.- Specified by:
getFuelValuein interfaceIFuelRegistryfluid- the fluid- Returns:
- the fuel value (0 for fluids which have not been registered as fuels)
-
getBurnRateMultiplier
public float getBurnRateMultiplier(net.minecraft.world.level.Level world, net.minecraft.world.level.material.Fluid fluid) Description copied from interface:IFuelRegistryGet the burn rate of the given fluid. Higher burn rates will generate compressed air faster in a Liquid Compressor (and be used up faster), without affecting the total amount of air produced.- Specified by:
getBurnRateMultiplierin interfaceIFuelRegistryfluid- the fluid- Returns:
- the burn rate (1.0f is the standard, default, rate)
-
registeredFuels
public Collection<net.minecraft.world.level.material.Fluid> registeredFuels(net.minecraft.world.level.Level world) Description copied from interface:IFuelRegistryGet all the known fuels which have been registered with the fuel registry. In the case of conflicts, precedence is as follows: 1) fluids from datapacks, 2) fluid tags from datapacks, 3) fluids from API registration (including built-in), 4) fluid tags from API registrationNote: this is a relatively expensive operation and should be used with care. Use
IFuelRegistry.getFuelValue(Level, Fluid)if you just need the value of a known fluid.- Specified by:
registeredFuelsin interfaceIFuelRegistry- Parameters:
world- the world- Returns:
- a collection of fuel fluids
-
clearCachedFuelFluids
public void clearCachedFuelFluids()
-