

Join at least of us on Discord right now!
If you want a server setup using Coal Explosion with zero effort, get a server with BisectHosting and receive 25% off your first month as a new customer using the code kreezxil

Making coal irritating to your players. :)
Configurable
Range (default = 5.0, min 0 max 256.0): The range of the explosion of a coal block.
Strength (default = 10.0, min 0, max 256.0): The amount of damage the explosions do.
causeFire (default = false): Whether an exploding coal block should cause fire.
Sparks (default = iron and gold pickaxes): Whatever you add to this list will trigger explosions like Pigporker below was expecting.
1.19+:
I've implemented a tag coalexplosion:igniters to Coal explosion and added all vanilla torches to it. I've also added a config option to add more igniting items that way (which I was able to confirm works by inserting "minecraft:stick")
This way new items can be either done through a datapack or a config option
I also kept an extra check for instanceof TorchBlock to keep the same level of compatibility with any mods that extend the class
Example Config from NeoForge 1.21.1:
[general]
#General settings
#The range of the explosion of a coal block.
#Range: 0.0 ~ 256.0
explosionRange = 5.0
#Whether an exploding coal block should cause fire.
causeFire = true
#A list of extra configured items that can cause coal to explode
configuredIgniters = ["minecraft:iron_sword", "minecraft:iron_pickaxe", "minecraft:iron_axe", "minecraft:iron_shovel", "minecraft:iron_hoe", "minecraft:golden_sword", "minecraft:golden_pickaxe", "minecraft:golden_axe", "minecraft:golden_shovel", "minecraft:golden_hoe", "minecraft:netherite_sword", "minecraft:netherite_pickaxe", "minecraft:netherite_axe", "minecraft:netherite_shovel", "minecraft:netherite_hoe"]
#A list of extra configured blocks that igniters can cause to explode
configuredBlocks = ["minecraft:coal_block", "minecraft:magma_block", "minecraft:nether_wart_block", "minecraft:crimson_nylium", "minecraft:warped_nylium"]
The mod offers a variety of configuration options to fine-tune the explosive behavior of coal blocks:
This configuration system allows for a dynamic and challenging gameplay experience, where coal mining can become a risky endeavor, especially when using non-exempt tools or in the presence of certain environmental factors.

Fabric Versions require Fabric API and ClothConfig
Recommend Mod Companions:
https://www.curseforge.com/minecraft/mc-mods/spelunkers-charm-ii