Steam Boiler Heat Source - boilerHeatHandler
CreateEvents.boilerHeatHandler((event) => {
/**
* Explanation of Heat Level:
* -1: This block does not provide heat in any form.
* 0 : This block provides passive heat. (Like unfueled blaze burners)
* 1 : This block provides 1 unit of heat (1 green bar in the status, like fueled blaze burners)
* 2 : This block provides 2 units of heat (like blaze-caked burners)
* X : This block provides X units of heat, which is X green bars in the status
*
* Notice that the callback is invoked only when there's an update signal to the boilers.
* Like a change of blockstate in adjacent blocks, breaking/placing, etc.
*/
/**
* Register a heater for a single block.
* The parameter in the callback is a BlockContainerJS.
*/
event.add("minecraft:diamond_block", (block) => {
return 2;
});
/**
* Register a heater for a block predicate.
*/
event.addAdvanced("#minecraft:logs", (block) => {
if (block.id === "minecraft:oak_log") {
return 1;
} else {
return 2;
}
});
});
Original2024/11/10About 1 min