This guide provides technical documentation for extending Better Fire+, adding custom thermal reaction rules, preserving block permutations and container inventories, and integrating external Script Add-ons.
The documentation is divided into five parts:
system.beforeEvents.startup, world.afterEvents.worldLoad).system.runJob).EXACT_RULES) vs. pattern matching (PATTERN_RULES).TransformRule property reference (threshold, chance, minSourceHeat, preserveState, spill, drop).BlockPermutation state key intersection.VOLATILE_STATES blacklist.snapshotContainer, restoreContainer, scatterSnapshot).betterfire: namespace)./bf:fire, /bf:firefeature) and read-only execution model.burnContainers, glassShatter, etc.)./scriptevent listener channel (bf:difficulty, bf:intensity, etc.).RawMessage localization and C++ native variant conversion safety.tests/mock-server.js) and ES module loader hooks (tests/resolve-hook.mjs)../tests/run.sh) and test suite verification coverage (158 assertions).Rules are added in behavior_packs/better_fire/scripts/rules.js:
// Adding a static exact-match rule:
"minecraft:dried_kelp_block": {
feature: "ignitables",
threshold: 20,
chance: 0.35,
minSourceHeat: 8,
result: "minecraft:fire",
sound: "random.fizz",
label: "Dried Kelp Ignition"
}
To run the full test suite locally without starting a Bedrock client:
./tests/run.sh
01. System Architecture & Module Design