Interface IHeatRegistry

All Known Implementing Classes:
HeatExchangerManager

public interface IHeatRegistry
  • Method Summary

    Modifier and Type
    Method
    Description
    Create a new ticking heat exchanger logic instance for use in block entities (or potentially other ticking objects) that you create.
    void
    registerBlockExchanger(net.minecraft.world.level.block.Block block, double temperature, double thermalResistance)
    Deprecated, for removal: This API element is subject to removal in a future version.
    removing in 1.19; this should be done by datapack
    void
    registerHeatBehaviour(net.minecraft.resources.ResourceLocation id, Supplier<? extends HeatBehaviour> heatBehaviour)
    Register a heat behaviour instance.
  • Method Details

    • makeHeatExchangerLogic

      IHeatExchangerLogic makeHeatExchangerLogic()
      Create a new ticking heat exchanger logic instance for use in block entities (or potentially other ticking objects) that you create.
      Returns:
      a heat exchanger logic
    • registerBlockExchanger

      @Deprecated(forRemoval=true) void registerBlockExchanger(net.minecraft.world.level.block.Block block, double temperature, double thermalResistance)
      Deprecated, for removal: This API element is subject to removal in a future version.
      removing in 1.19; this should be done by datapack
      Register a block as a simple heat exchanger (temperature and thermal resistance only; no blockstate transitions). Don't call this directly; subscribe to HeatRegistrationEvent or, preferably, use datapacks.

      Note: the preferred way (and the only way if you want blockstate transitions) to do this is with datapack recipes. See data/pneumaticcraft/recipes/block_heat_properties/*.json

      Parameters:
      block - the block
      temperature - the block's temperature
      thermalResistance - the thermal resistance, i.e. how quickly heat will be transferred
    • registerHeatBehaviour

      void registerHeatBehaviour(net.minecraft.resources.ResourceLocation id, Supplier<? extends HeatBehaviour> heatBehaviour)
      Register a heat behaviour instance. This can be called from a FMLCommonSetupEvent handler; do not use ParallelDispatchEvent.enqueueWork(Runnable). Alternatively, if you need to override in-built behaviour (e.g. to disable automatic furnace fueling), you can register a handler in a ServerAboutToStartEvent handler.

      This is intended to add custom behaviours to certain block entities, similar to how the vanilla furnace is handled. For general blockstate transitions (on excess heat added/removed), the correct way to do this is with datapack recipes. See data/pneumaticcraft/recipes/block_heat_properties/*.json for examples.

      Parameters:
      id - a unique for this heat behaviour
      heatBehaviour - a heat behaviour supplier