Package me.desht.pneumaticcraft.api.fuel
Interface IFuelRegistry
- All Known Implementing Classes:
FuelRegistry
public interface IFuelRegistry
-
Method Summary
Modifier and TypeMethodDescriptionfloatgetBurnRateMultiplier(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.Collection<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.
-
Method Details
-
getFuelValue
int getFuelValue(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.- Parameters:
fluid- the fluid- Returns:
- the fuel value (0 for fluids which have not been registered as fuels)
-
getBurnRateMultiplier
float getBurnRateMultiplier(net.minecraft.world.level.Level world, net.minecraft.world.level.material.Fluid fluid) Get 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.- Parameters:
fluid- the fluid- Returns:
- the burn rate (1.0f is the standard, default, rate)
-
registeredFuels
Collection<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. 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
getFuelValue(Level, Fluid)if you just need the value of a known fluid.- Parameters:
world- the world- Returns:
- a collection of fuel fluids
-