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.

@FunctionalInterface public interface BoilerHeater
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

    Fields
    Modifier and Type
    Field
    Description
    static final BoilerHeater
    The heater used by Blaze Burners.
    static final int
     
    static final BoilerHeater
    The heater used by common passively-heating blocks.
    static final int
     
    static final SimpleRegistry<net.minecraft.world.level.block.Block,BoilerHeater>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    float
    getHeat(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

      static final BoilerHeater PASSIVE
      The heater used by common passively-heating blocks. Automatically provides heat for any block in the create:passive_boiler_heaters block tag.
    • BLAZE_BURNER

      static final BoilerHeater BLAZE_BURNER
      The heater used by Blaze Burners. Addons can register this to their own blocks if they use the same functionality.
    • REGISTRY

      static final SimpleRegistry<net.minecraft.world.level.block.Block,BoilerHeater> 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, returns NO_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: