Package com.simibubi.create.api.boiler
Interface BoilerHeater
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A BoilerHeater provides heat to boilers.
Boilers will query blocks for heaters through the registry, usually with
findHeat.
Heaters can provide a heat level by returning any positive integer from their getHeat method.
Returning any negative number counts as no heat - NO_HEAT is provided for convenience.
Returning PASSIVE_HEAT is special - passive heat can be used to provide a small amount of heat, highly limiting
in its abilities. This is usually used for free sources of heat, such as fire or magma blocks.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BoilerHeaterThe heater used by Blaze Burners.static final intstatic final BoilerHeaterThe heater used by common passively-heating blocks.static final intstatic final SimpleRegistry<net.minecraft.world.level.block.Block, BoilerHeater> -
Method Summary
Modifier and TypeMethodDescriptionstatic floatfindHeat(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Gets the heat at the given location.floatgetHeat(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
-
Field Details
-
PASSIVE_HEAT
static final int PASSIVE_HEAT- See Also:
-
NO_HEAT
static final int NO_HEAT- See Also:
-
PASSIVE
The heater used by common passively-heating blocks. Automatically provides heat for any block in thecreate:passive_boiler_heatersblock tag. -
BLAZE_BURNER
The heater used by Blaze Burners. Addons can register this to their own blocks if they use the same functionality. -
REGISTRY
-
-
Method Details
-
findHeat
static float findHeat(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) Gets the heat at the given location. If a heater is present, queries it for heat. If not, returnsNO_HEAT. -
getHeat
float getHeat(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state) - Returns:
- the amount of heat to provide.
- See Also:
-