Description


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
Explosive Coal
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"]
Planned Features
The mod offers a variety of configuration options to fine-tune the explosive behavior of coal blocks:
- Allowed Tools: A list of tools allowed for harvesting without triggering a calamity. By default, this includes wood and diamond tools. There is no blacklist; tools are either exempt or they are not.
- Base Chance to Ignite: The base probability that a coal block will ignite upon certain triggers, such as being mined with non-exempt tools or being near fire sources.
- Base Chance After Ignition to Become Magma Block: The base chance that an ignited coal block will transform into a magma block.
- Base Chance After Ignition to Explode: The base chance that an ignited coal block will explode.
- Explosion Chance Increases: Various factors can increase the chance of an explosion:
- Neighbor on Fire: Chance increase amount if a neighboring block is on fire.
- Neighbor is Magma Block: Chance increase amount if a neighboring block is a magma block.
- Neighbor is Coal: Base chance to increase explosion if a neighboring block is coal.
- Neighbor is Flammable: Base chance to increase explosion if a neighboring block is flammable.
- Explosion Strength Modifiers: The explosion strength can be increased based on adjacent blocks:
- Coal Explosion Increase Amount: For each adjacent coal ore, this increases the explosion strength.
- Flammable Explosion Increase Amount: For each adjacent flammable block, this increases the explosion strength.
- Magma Explosion Increase Amount: For each adjacent magma block, this increases the explosion strength.
- Lava Interaction: There is a configuration option to consider lava as an ignition source. By default, this is turned off to prevent excessive explosion lag. If enabled, coal veins touching lava will ignite and be treated as if adjacent to a magma block.
- Ignition by Torches: Regular torches can ignite coal blocks with a chance each tick update.
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







