

现在就来 Discord 加入至少 我们!

如果你想零 effort 地搭建一个使用 Coal Explosion 的服务器,请购买 由 BisectHosting 提供的服务器,并在首次续费时使用代码 kreezxil 享受新客户首月 25% 的折扣。

爆炸煤炭
让你的玩家对煤炭感到头疼。:) Coal Explosion 为煤炭开采和方块交互增加了可配置的潜在危险。不同版本的功能和设置有所不同;请参阅下方对应 Minecraft 版本的章节。
NeoForge 26.3
Coal Explosion 1.14.0 · Minecraft 26.3 · NeoForge · Java 25
作者:Kreezxil 和 Rick South。已在 NeoForge 26.3.0.101 上测试通过。
此版本提供了独立的点火器/反应堆组、原生群组编辑器、高级事件规则、可选的燃烧箭矢反应,以及带有可配置扩散范围和最终结果的渐进式引燃方块警告。它添加了一种临时方块和一种方块实体类型,并未添加新的矿石或世界生成内容。无需安装任何核能类模组。
安装与普通通用配置
- 安装匹配的 NeoForge 版本和 Java 25。将模组安装在客户端和专用服务器上;客户端需要其临时方块和资源。删除重复的旧版 jar 文件。此发布版不是 Fabric 或旧版 Forge 的 jar 包。
- 首次启动以创建
config/coalexplosion-common.toml。所有 26 项设置均位于 [general] 下。在尝试实验性配置前,请备份存档和配置文件。
- 普通通用配置文件使用 NeoForge 26.3 的
LOCAL 配置槽位。它不是每个世界的 SERVER/SYNCED 文件,可以在加载世界之前进行编辑。
- 在单人游戏中,实例的文件控制游戏行为。在专用服务器上,服务器的文件控制所有玩家的游戏行为。本地客户端屏幕无法编辑远程服务器的文件。不提供自定义配置同步、远程管理命令或每个玩家的覆盖设置。
- 支持原生存档和有效的加载器重载。手动编辑后重启是最简单可重现的工作流程。已激活的方块保留保存的引信/扩散截止时间;后续的结果决策可以使用更改后的设置。
实际 shipped 默认值的作用
五种点击点火源是 minecraft:torch、minecraft:soul_torch、minecraft:redstone_torch、minecraft:campfire 和 minecraft:soul_campfire。它们的正常目标是 #c:ores/coal,涵盖测试环境中的普通煤炭矿石和深板岩煤炭矿石。存储用的 minecraft:coal_block 不会自动包含在内。
- 一个默认组将这五种物品与煤炭矿石标签配对。
- 此外,21 个默认高级规则包括十个左键/右键规则:每种物品都有 1.0 的概率点燃煤炭矿石。
- 使用铁镐或金镐挖掘煤炭矿石时,每次符合条件的尝试有 0.01 的点燃概率。木镐和钻石镐没有默认的挖掘映射;也没有豁免工具列表。
- 火焰邻居具有 1.0 的引燃规则。每个火把/营火的邻居具有 0.01 的引燃规则。这些规则由邻居通知和跟踪的重检查驱动,而非全地图扫描。
- 默认进程中包含一个 0.01 的
ON_FIRE_TICK 火焰规则,随后是按顺序排列的 0.01 BURN_TICK 岩浆与爆炸规则。
- 高级点击规则优先级更高,因此附带的火把/营火点击会触发警告而非立即引发群体爆炸。默认设置使用 80 刻保险丝、4 刻蔓延延迟、
RULE_FAMILY 蔓延机制以及对角线候选者。
- Projectile、burning-projectile 和 explosion-activity 规则为 可选启用。默认不启用 dirt 或 uranium 映射。邻接加成默认为零,熔岩处理默认关闭。
独立的点火器和反应堆组
ignitersAndReactors 使用普通的嵌套 TOML 数组。每个条目严格对应 [[igniters], [reactive blocks]]。任何点火器仅与该条目内的反应堆配对;各组之间不会交叉匹配。Java 表示形式为不可变的 IgniterGroup(List<String> igniters, List<String> reactiveBlocks)。
默认组如下所示:
[general]
ignitersAndReactors = [
[
[
"minecraft:torch",
"minecraft:soul_torch",
"minecraft:redstone_torch",
"minecraft:campfire",
"minecraft:soul_campfire"
],
[
"#c:ores/coal"
]
</code></pre>
可选隔离示例(非默认行为):打火石可激活煤炭/泥土,铁镐可激活可选的铀块,火把可激活上述两组中的任意一组。缺失的可选方块 ID 不会匹配任何内容,也不会引入依赖关系。
ignitersAndReactors = [
[["minecraft:torch", "minecraft:flint_and_steel"], ["#c:ores/coal", "minecraft:dirt"]],
[["minecraft:torch", "minecraft:iron_pickaxe"], ["nuclearcraft:uranium_ore"]]
]
- 第一侧条目为物品 ID 或
#item-tags(物品标签);第二侧条目为方块 ID 或 #block-tags(方块标签)。请使用完整命名空间。前后空白字符会被修剪;语法会经过验证。
- 未知的 ID 和缺失/空的标签将匹配不到任何内容。新建的组不会隐式包含
#coalexplosion:igniters;如需使用请显式添加。该捆绑物品标签包含了随包提供的五个物品。
ignitersAndReactors = [] 会禁用所有组。单个配对的两边都可以为空,使该配对失效。
- 格式错误的配对会被记录日志并作为整个组被跳过。错误的外部配置类型可能触发 NeoForge 的修正/默认值恢复。
- 组是简单的左键/右键点击映射,请求即时爆炸。它们不配置挖掘、投射物、邻居引燃、概率、自定义结果或渐进式引燃。
原生组编辑器:添加、编辑、删除、保存或取消
在主菜单界面,打开Mods → Coal Explosion → Config → Common Configuration → General → Igniter and Reactor Groups → Edit Groups...。无需加载世界。
- 使用 Previous/Next 选择组;Add Group 创建空配对;Remove Group 从草稿中移除该配对。移除所有组后保存会得到一个空数组。
- 引燃物和反应方块是分开的可滚动文本字段:每行输入一个 ID 或
#tag。空行会被忽略,支持空列表。
- Save 会验证每个组并持久化常规通用配置。错误信息会指出组、侧边和行号。验证检查语法,但不检查是否安装了可选模组/标签。
- Cancel/Escape 会丢弃此编辑器中的独立草稿,而不更改其当前生效的组值或进行保存。导航和调整大小会保留草稿。
- 如果在编辑器打开期间组值在其他地方发生了更改,Save 拒绝覆盖它:请先取消并重新打开。持久化异常会恢复之前的生效组值,保留草稿,并显示错误。
- 其他设置保留原生的 NeoForge 控件。Group Cancel 不会撤销这些控件中的早期更改;Group Save 使用整文件保存,也可以持久化它们的待处理编辑。原生部分的 Reset 可以重置组。
- 所有标签均已本地化,工具提示最多 30 个词;详细说明见配置注释。非常长的高级规则可能直接在 TOML 中编辑更容易。
高级反应规则与优先级
reactionRules 是一个有序字符串数组,每个字符串包含三到五个用分号分隔的字段:
block-or-#block-tag;ACTIVITY;item-or-#item-tag[;chance[;result-block]]
- 目标 (Target):方块 ID 或方块标签;处于引爆状态时,匹配使用的是保存的原始状态。不支持
* 通配符。
- 活动 (Activity):下面列出的九种活动之一;名称不区分大小写。
- 过滤器 (Filter):手持物品/弹药 ID 或物品标签,或者是邻居规则的邻居方块/物品标识。
minecraft:air 是与工具无关的通配符;none 要求提供的物品为空。未手持物品的点击在匹配前会被拒绝。
- 概率 (Chance):可选的 0 到 1 之间的有限数值;省略/空白表示 1.0。无效的值、活动、字段数和结果标签将被拒绝并记录日志。
- 结果 (Result):省略/空白表示爆炸。
minecraft:fire 或 coalexplosion:primed_block 请求引燃。已安装的普通方块 ID 会替换为其默认状态;minecraft:air 会移除方块。
使用完全限定且区分大小写的 ID/标签。缺失的目标/工具 ID 和标签将匹配不到任何内容。组的验证比旧版高级解析器的不可靠的非限定 ID 简写更严格。过滤器测试的是 ID/标签成员资格,而非附魔、耐久度、组件、名称或 NBT。邻居标签可能匹配方块或其方块物品的物品标签。
点击优先级:高级规则优先于组运行。第一个成功的高级点击规则处理交互;如果没有任何规则成功,组仍可能请求即时爆炸。组不限制高级规则。编辑组不会重写规则。失败/零概率的规则不是拒绝规则,可能会穿透到组。清空两个活动数组以禁用所有模组反应。
直接点击、挖掘、投射物和爆炸处理在遇到第一个成功的高级规则时停止。邻居/隐形进程有不同的循环,可能会处理多条规则;引爆后的最终解析遵循以下顺序。
所有支持的九种活动
LEFT_CLICK:服务器端玩家对方块的左键点击,使用事件中的手持物品。
RIGHT_CLICK:玩家对方块的右键点击,使用该手的物品。
MINE:实际的方块破坏事件,使用主手物品;不同于单纯的左键点击。
PROJECTILE:投射物撞击方块,无论是否燃烧。AbstractArrow 提供其来源/拾取弹药;其他投射物类型提供空物品。
BURNING_PROJECTILE:相同的撞击,但仅在投射物实体实际着火时有效。
EXPLOSION:爆炸受影响方块列表中的一个位置;提供的物品为空,因此通常使用 minecraft:air 或 none。
NEIGHBOR_IGNITE:在邻居更新后通知相邻面,放置后通知所有六个面,并跟踪重新检查;过滤器描述的是邻居。
ON_FIRE_TICK:不可见的燃烧进程;在引燃模式下,为引燃时的相邻火焰提供一个专用的单次钩子。
BURN_TICK:不可见的燃烧进程或已引燃方块最终的解析结果。
选择加入的燃烧箭矢,不改变普通投射物的行为
将此字符串追加到现有的 reactionRules 数组中,以保留其其他规则:
"#c:ores/coal;BURNING_PROJECTILE;#minecraft:arrows;1.0;minecraft:fire"
或者,如果它应该是唯一的进阶规则,请使用此完整的替换数组:
reactionRules = [
"#c:ores/coal;BURNING_PROJECTILE;#minecraft:arrows;1.0;minecraft:fire"
]
仅当箭矢在撞击时处于燃烧状态时,才会开始煤炭的警告。它会检查实际投射物的 isOnFire(),而不是射手的火状态、单独的火焰附魔或虚构的燃烧箭矢物品。熄灭的箭矢不符合条件;由其他机制点燃的箭矢可以符合条件。请使用弹药 ID/标签,而不是弓/弩的 ID 或持有者的当前手持状态。
现有的 PROJECTILE 规则仍接受冷态和燃烧状态的投射物。这两种活动共享一个有序的处理阶段:较早的成功普通规则可以在较晚的仅燃烧规则之前处理撞击。玩家拥有、生物拥有以及无主/发射器风格的投射物均被接受;不存在所有者/队伍/领地条件。非箭矢类投射物提供空物品项,需要合适的通配符/空过滤器。实体命中和未命中不是触发条件。
替代方案:#c:ores/coal;BURNING_PROJECTILE;minecraft:arrow;1.0 请求立即爆炸而非警告。它过滤的是普通箭矢物品,而不是标签中的所有弹药物品。没有随附启用的投射物规则。
TOML 允许在一个部分中每个键只进行一次赋值。请编辑现有数组;不要粘贴第二个 reactionRules 键。替换数组会移除其之前的挖掘、邻居和进程示例。
消耗、创造模式、取消及输出安全性
- 成功的进阶/组右键操作会在非创造模式下消耗一整件手持物品,取消正常使用并返回成功。以此方式使用的工具作为物品被消耗,而非减少一点耐久度。
- 进阶左键点击取消正常处理但不消耗物品。组左键点击保留历史 PASS/非取消行为,同时请求爆炸。
- 成功的挖掘规则取消普通破坏及其正常掉落;模组不添加工具消耗或耐久度伤害。
- 成功的投射物规则取消正常撞击,但不会丢弃投射物或消耗额外的弹药/所有者物品。投射物可以继续飞行。原版射击成本保持独立。
- 爆炸规则不会取消/移除原始爆炸受影响的区块位置。其爆炸仍可能影响新放置的非抗性结果。
- 缺失的输出 ID 可在直接规则中作为空操作处理:取消/右键消耗仍可发生。请仔细检查输出 ID。
- 直接替换使用方块的默认状态,不保留库存或属性。这不是一种通用的保留库存的转换系统。
- 使用
minecraft:fire 进行便携点火。其他火焰方块被视为通用直接处理程序的点火源,但专用的引燃刻度钩子会以不同方式识别精确标记;灵魂之火并非在所有地方都通用。
- 其他模组的取消、原版规则、抗性和爆炸行为可能会影响交互效果。没有权限/领地集成或保证的替代掉落系统。
引燃警告:声音、粒子及动画视觉循环
启用 primedIgnition = true 后,点火结果尝试创建 coalexplosion:primed_block,记录原始状态、根家族、矿脉预算以及引信/扩散截止时间。每个新引燃方块播放原版 TNT 引信声音,发出引燃引信事件,并产生烟雾/偶尔的火焰粒子。
其面重复显示煤炭方块图案 → 亮白色煤炭图案 → 黑色/深色岩浆图案。三个 16×16 帧各持续五个刻度,无插值。这是一个全局纹理图集动画,而非每个方块的独立引信时钟:新方块可以从任何阶段开始。深色岩浆帧仅是视觉警告;它不会承诺或偏向最终结果。健康的煤炭纹理不受影响。
临时方块在生存模式下无法被破坏,具有极高的防爆性且活塞无法推动。它没有方块物品、合成配方、战利品表或创意模式标签页条目。空气、已引燃状态、带方块实体的方块以及含流体/被水浸透的状态通常无法引燃。失败的根尝试回退到不可见燃烧;失败的扩散候选者将被跳过。手动构造 malformed 引燃方块不是支持的设置方法。
逐渐扩散、最终岩浆/爆炸结果及持久性
每个新引燃方块在其存储的延迟后尝试一次扩散步骤,然后在其自身的引信截止时间解析。这会产生错落的传播前沿,而不是瞬间转换整个矿脉。名义上 20 个刻度等于一秒;延迟变化会影响墙钟时间。
RULE_FAMILY:相同的原始方块类型或根规则的目標 ID/标签;煤炭标签可以连接普通矿石和深板岩矿石。
SAME_BLOCK:仅限当前原始方块类型。
ANY_REACTIVE:相同类型或由任意组/规则命名的方块,无视其他映射的活动性/概率。
NONE:不向根节点以外扩散。
对角线扩散会检查周围 26 个位置;否则仅检查六个面。候选者必须已加载、符合条件,且处于活跃矿脉预算和已加载引燃上限之内。扩散不会强制加载候选区块,也不会重试被跳过的候选者。根项目的过滤器/概率不会为每个子项独立重新投掷。
在引信结束时,按顺序匹配的 BURN_TICK 规则会检查原始状态,并忽略其项目字段。为了避免重启引信,精确的正常燃烧/引燃方块结果会被跳过。第一个成功的爆炸或可用混凝土结果获胜;未知输出将被跳过。如果没有规则解析该方块,magmaChance 将选择回退方块或爆炸。无效的 magmaResultBlock 将回退至原版岩浆。
0.25 的默认值是一个回退概率,而非覆盖性的最终百分比。 早期的 BURN_TICK 规则优先运行。使用随附的精确规则和零加成时,每个方块的总最终岩浆概率约为 25.5025%。将 magmaChance 设置为 0 或 1 并不会覆盖早期的输出/爆炸规则;如需确定性的回退行为,请移除这些规则。
引燃的 ON_FIRE_TICK 处理是针对精确 minecraft:fire 输出的单次点火钩子,忽略工具字段。它不会运行任意的 ON_FIRE 替换。其他火焰输出可能是特殊最终处理中的字面量方块,若不受支持则会消失。
时间戳和原始状态与引燃实体一起保存,并使用计划刻。现有时间戳不会因配置编辑而重置;新子项使用当前计时。已加载位置的跟踪会在移除/卸载时释放。矿脉预算快照可以在卸载/重启后重建,因此限制是有界的活跃预算,而非跨越所有历史的精确持久寿命计数器。
隐形燃烧、邻居引燃及可选岩浆
如果禁用引燃或根节点无法引燃,原始方块将保持隐形跟踪。模组会尝试在首个方块上方垂直放置有效火焰,然后水平放置。causeFire = false 控制的是由爆炸产生的火焰,而非此次初始点火火焰。
隐形燃烧通过 ON_FIRE/BURN 规则进行,使用空项目过滤器和跟踪器冷却时间。它没有临时方块、保存的引信、引燃扩散步骤或 magmaChance 回退。随着转换的进行,多个适用规则可以执行。这些内存中的监视/燃烧作业不会被序列化,并在关卡卸载时清除。
邻居检测使用相关的相邻面和受监视的重检;当源消失时,未引燃的监视会被移除。启用 treatLavaAsMagma = true 时,岩浆被视为岩浆以计算加成,并在邻居匹配中显示为火焰。此时,一个火焰邻居规则可以引燃岩浆旁边的矿石。在该替代方案下,显式的岩浆过滤器并不等效。当选项为 false 时,显式配置的岩浆规则仍可能匹配。为避免广泛的连锁反应,岩浆处理默认关闭。
邻居修饰符、冷却时间、爆炸范围及安全上限
符合条件的概率计算会加上六面火焰/岩浆/煤类似/易燃加成,并将结果钳制在 0–1 之间。这些加成适用于爆炸结果的 BURN_TICK 规则和 EXPLOSION-活动规则,而非每次触发。煤类似包括煤标签或由任意活跃组/规则命名的方块;易燃排除了空气、火焰、岩浆类似和煤类似方块。对角线扩散不会改变这些六面计数。
零基础概率并非全局禁用: 符合条件的正加成可以提高它,失败的点击规则可能会落入组中。为确保安全,请移除适用的映射;这里没有否定/拒绝规则或豁免工具的覆盖。
chanceCooldownTicks 控制跟踪的进度/重检和直接概率尝试。保证的直接规则绕过此门控。一次失败的尝试可以保留某个位置的冷却时间,并抑制后来的概率规则。引燃的最终解析不使用该直接冷却时间。它不是对所有事件的通用去抖。
最终爆炸半径为 max(0, explosionRange + adjacentCoalLike * coalExplosionRangeBonus + adjacentFlammable * flammableExplosionRangeBonus + adjacentMagma * magmaExplosionRangeBonus)。加成可以使最终半径超过基础选项的最大值。此版本中没有独立的爆炸强度设置。
explosionChainLimit 限制嵌套的模组生成爆炸深度(包括根节点);零会抑制模组爆炸调用,但不会抑制所有转换/点火或预先存在的地狱烈焰爆炸。被抑制的爆炸不会撤销物品消耗或恢复已被移除的引燃方块。
maxTrackedBlocks 限制每维度受监视/隐形的位置数量。燃烧会首先驱逐监视;即时事件仍可能在跟踪上限处做出反应。
maxPrimedBlocks 限制每维度已加载的引燃位置数量。受限的根节点可回退到隐形燃烧;受限的扩散候选者将被跳过。
veinScanLimit 包含根节点并限制活跃的点火预算。
- 解析后的设置会被缓存,引燃计时使用计划刻,而非全地图扫描。只有明确的引燃扩散具有所述的无强制加载保证;回退跟踪读取有不同的限制。
上限是安全措施,而非防卡顿的承诺。大半径、宽泛的标签、重叠的规则以及增加的上限仍可能导致破坏性和高开销。请先测试备份的世界。
全部 26 个常见设置:默认值和允许的值
所有条目均属于 [general] 配置节。数值边界为包含两端;布尔值接受 true/false。空的活跃数组是合法的。错误的选项类型可能触发 NeoForge 的修正或默认值恢复。
| 设置项 | 默认值 | 范围 / 作用 |
explosionRange | 5.0 | 0..256;在添加邻近效应前的基础半径 |
causeFire | false | 请求模组爆炸引发火灾 |
ignitersAndReactors | 一个包含五项的组 / coal-tag 标签组 | 嵌套的双列表对结构;允许外层和侧边为空 |
reactionRules | 上述描述的 21 条规则 | 有序的 3–5 字段字符串;允许为空 |
neighborFireChanceBonus | 0.0 | 每个相邻火源 +0.0~1.0,用于符合条件的概率计算 |
neighborMagmaChanceBonus | 0.0 | 每个相邻类岩浆方块 +0.0~1.0 |
neighborCoalChanceBonus | 0.0 | 每个相邻类煤炭/反应性方块 +0.0~1.0 |
neighborFlammableChanceBonus | 0.0 | 每个符合条件的易燃邻居 +0.0~1.0 |
coalExplosionRangeBonus | 0.0 | 每个相邻类煤炭/反应性方块增加 0..64 半径 |
flammableExplosionRangeBonus | 0.0 | 每个符合条件的易燃邻居增加 0..64 半径 |
magmaExplosionRangeBonus | 0.0 | 每个相邻类岩浆方块增加 0..64 半径 |
treatLavaAsMagma | false | 将熔岩计入岩浆计数,并使其作为火源参与邻居匹配 |
chanceCooldownTicks | 20 | 1..200 tick;冷却资格说明见上文 |
explosionChainLimit | 8 | 0..64 层嵌套模组爆炸深度 |
maxTrackedBlocks | 256 | 1..4096 每维度监控/不可见位置数 |
primedIgnition | true | 对符合条件的新根节点使用临时警告方块 |
warningTicks | 80 | 1..1200 tick;名义上的四秒引信时间 |
spreadTicks | 4 | 1..200 tick;每个方块的每次传播尝试前等待时间 |
magmaChance | 0.25 | 0..1;仅在 BURN_TICK 规则之后的最终回退机制 |
magmaResultBlock | minecraft:magma_block | 具体的回退输出方块;无效/未知方块回退至原版岩浆块 |
veinScanLimit | 64 | 1..4096;包括根节点在内的实时矿脉预算 |
maxPrimedBlocks | 1024 | 1..4096 每维度已加载的起爆方块数 |
spreadMode | RULE_FAMILY | RULE_FAMILY, SAME_BLOCK, ANY_REACTIVE, NONE |
spreadDiagonally | true | 检查周围 26 个候选方块而非仅六个面 |
configuredIgniters | 五个火把/营火 ID | 保留的一次性兼容输入,非第二个活跃的全局列表 |
configuredBlocks | ["#c:ores/coal"] | 保留的一次性兼容输入,非第二个活跃的全局列表 |
现有配置与兼容性迁移
如果存在 coalexplosion-synced.toml 但公共文件不存在,该模组会尝试单向重命名为 coalexplosion-common.toml。如果两者都存在,公共文件优先;另一个文件不会被合并或删除。请检查日志以查看重命名错误。
对于缺少 general.ignitersAndReactors 的现有公共文件,迁移过程会在插入默认值之前读取旧的 configuredIgniters/configuredBlocks。它将创建一个组合组,保留该组内部它们原有的全连接关系,并显式添加 #coalexplosion:igniters,因为旧版点击路径始终包含该标签。空的旧方块列表保持禁用状态;无效的旧条目不会静默提升为新的匹配行为。原始键字符串保持不变。
如果在保存迁移后的组之前不存在名为 coalexplosion-common.toml.pre-groups.bak 的备份,则会创建该备份。迁移失败会阻止加载,而不是静默替换为新组的默认值。一旦组键存在(即使为空数组 []),即具有权威性:后续的旧列表编辑不会重新合并或激活组。现有的高级规则保留其语义;迁移不会启用燃烧箭。
验证与现实限制
真实的无头 GameTest 套件通过了 16/16 项必需测试,包括原版总是通过的测试。覆盖范围包括真实的弓箭火灾状态/命中事件、过滤器与所有者、旧语法、组隔离/迁移、编辑器模型/保存/取消/冲突处理、默认值、起爆/传播/结果、熔岩行为、资源文件以及工具提示长度。提取的源代码归档已独立重建并经过测试。
自定义屏幕和动画警告在此未经图形化验证。服务器测试不能证明外观、布局、烟雾或音效。测试也无法模拟穿过水的完整弓箭飞行、可选模组/标签、事件冲突或重启/卸载历史。延迟的起爆 blast 不会保留射手归属。未实现任何新矿石/世界生成、配方、安全工具列表、独立强度选项、所有者选择器、权限系统、远程配置或自定义警告 HUD。
旧版本
以下设置、示例和历史计划描述的是较旧的发行版或早期的设计构想。它们并非 NeoForge 26.3 的配置参考。
早期可配置的设置
Range(历史默认值 = 5.0,最小值 0,最大值 256.0):煤炭块爆炸的范围。
Strength(历史默认值 = 10.0,最小值 0,最大值 256.0):爆炸造成的伤害量。
causeFire(历史描述:默认值 = false):爆炸的煤炭块是否应引发火灾。
Sparks(历史默认值 = 铁镐和金镐):添加到此列表中的任何物品都会触发爆炸,就像 Pigporker 之前期望的那样。
1.19+
我已为煤炭爆炸实现了一个标签 coalexplosion:igniters,并将所有原版火把都加入了其中。 我还添加了一个配置选项,以便以这种方式添加更多引燃物品(我通过将 "minecraft:stick" 插入来确认其有效)。
这样,新物品可以通过数据包或配置选项来实现。
我还保留了一个额外的 instanceof TorchBlock 检查,以保持与任何扩展该类的模组的相同级别的兼容性。
NeoForge 1.21.1 的配置示例
此保留的旧版本示例并非当前的默认配置。特别是,其 causeFire 值为 true。
[general]
#General settings
煤块爆炸的范围。
#范围:0.0 ~ 256.0
explosionRange = 5.0
#引爆的煤块是否应引发火灾。
causeFire = true
#可导致煤块爆炸的额外配置物品列表
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"]
#引爆者可导致爆炸的额外配置方块列表
configuredBlocks = ["minecraft:coal_block", "minecraft:magma_block", "minecraft:nether_wart_block", "minecraft:crimson_nylium", "minecraft:warped_nylium"]</code></pre>
旧版本的计划历史特性
以下内容是保留的历史规划文本,并非承诺所有提议都已实现。实际设置和行为请参考特定版本的文档。
该模组提供了多种配置选项,用于微调煤块的爆炸行为:
- 允许使用的工具: 列出在采集时不会触发灾厄事件的允许工具。默认情况下,这包括木制工具和钻石工具。没有黑名单;工具要么被豁免,要么不被豁免。
- 基础引燃几率: 煤块在特定触发条件下(例如使用非豁免工具挖掘或靠近火源)发生引燃的基础概率。
- 引燃后变为岩浆块的基础几率: 引燃后的煤块转化为岩浆块的基础几率。
- 引燃后爆炸的基础几率: 引燃后的煤块发生爆炸的基础几率。
- 爆炸几率增加因素: 多种因素可以增加爆炸的几率:
- 相邻方块着火: 如果相邻方块正在燃烧,爆炸几率增加的数值。
- 相邻方块为岩浆块: 如果相邻方块是岩浆块,爆炸几率增加的数值。
- 相邻方块为煤块: 如果相邻方块是煤块,爆炸几率增加的基础值。
- 相邻方块为易燃方块: 如果相邻方块是易燃方块,爆炸几率增加的基础值。
- 爆炸强度修正: 爆炸强度可以根据相邻方块进行提升:
- 煤矿爆炸增加量: 每有一个相邻的煤矿,爆炸强度增加的量。
- 易燃方块爆炸增加量: 每有一个相邻的易燃方块,爆炸强度增加的量。
- 岩浆块爆炸增加量: 每有一个相邻的岩浆块,爆炸强度增加的量。
- 与熔岩的交互: 存在一个配置选项,可将熔岩视为引燃源。默认情况下,此选项关闭以防止过多的爆炸卡顿。如果启用,接触熔岩的煤层将引燃,并被视为与岩浆块相邻。
- 火把引燃: 普通火把有几率在每个刻更新时引燃煤块。
该配置系统允许提供动态且具有挑战性的游戏体验,其中煤炭开采可能成为一项充满风险的行为,尤其是在使用非豁免工具或处于某些环境因素附近时。
提醒: 上述段落是历史计划,并非已实现的豁免工具列表或独立强度设置的证据。

Fabric 版本需要 Fabric API 和 ClothConfig
推荐模组伴侣:


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. :) Coal Explosion adds configurable danger to coal mining and block interactions. Features and settings differ between versions; see the section for your Minecraft version below.
NeoForge 26.3
Coal Explosion 1.14.0 · Minecraft 26.3 · NeoForge · Java 25
Authors: Kreezxil and Rick South. Tested with NeoForge 26.3.0.101.
This version provides independent igniter/reactor groups, a native group editor, advanced event rules, optional flaming-arrow reactions, and gradual primed-block warnings with configurable spread and final outcomes. It adds one temporary block and one block-entity type, not new ores or world generation. No nuclear mod is required.
Installation and ordinary common configuration
- Install the matching NeoForge version and Java 25. Install the mod on both clients and the dedicated server; clients need its temporary block and resources. Remove duplicate older jars. This release is not a Fabric or legacy Forge jar.
- Launch once to create
config/coalexplosion-common.toml. All 26 settings are under [general]. Back up worlds and configuration before experimenting.
- The ordinary common file uses NeoForge 26.3's
LOCAL config slot. It is not a per-world SERVER/SYNCED file and can be edited before loading a world.
- In singleplayer, the instance's file controls gameplay. On a dedicated server, the server's file controls gameplay for everyone. The local client screen cannot edit the remote server's file. No custom config synchronization, remote admin commands, or per-player overrides are provided.
- Native saves and valid loader reloads are supported. Restarting after manual edits is the simplest reproducible workflow. Existing primed blocks retain saved fuse/spread deadlines; later outcome decisions can use changed settings.
What the shipped defaults actually do
The five click igniters are minecraft:torch, minecraft:soul_torch, minecraft:redstone_torch, minecraft:campfire, and minecraft:soul_campfire. Their normal target is #c:ores/coal, covering ordinary and deepslate coal ore in the tested environment. A storage minecraft:coal_block is not automatically included.
- One default group pairs those five items with the coal-ore tag.
- Separately, 21 default advanced rules include ten left/right-click rules: each of the five items ignites coal ore with chance 1.0.
- Mining coal ore with an iron or golden pickaxe has a 0.01 ignition chance per eligible attempt. Wood and diamond have no default mining mapping; there is no exempt-tool list.
- A fire neighbor has a 1.0 ignition rule. Each of the five torch/campfire neighbors has a 0.01 ignition rule. Neighbor notifications and tracked rechecks drive these rules, not a whole-world scan.
- Default progression has a 0.01
ON_FIRE_TICK fire rule, then ordered 0.01 BURN_TICK magma and explosion rules.
- Advanced click rules take priority, so shipped torch/campfire clicks start a warning rather than an immediate group explosion. Defaults use an 80-tick fuse, four-tick spread delay,
RULE_FAMILY spread, and diagonal candidates.
- Projectile, burning-projectile, and explosion-activity rules are opt-in. No dirt or uranium mapping is enabled by default. Neighbor bonuses default to zero and lava treatment defaults off.
Independent igniter and reactor groups
ignitersAndReactors uses ordinary nested TOML arrays. Each entry is exactly [[igniters], [reactive blocks]]. Any igniter pairs with any reactor inside that entry only; groups do not cross-match. The Java representation is an immutable IgniterGroup(List<String> igniters, List<String> reactiveBlocks).
The default group looks like this:
[general]
ignitersAndReactors = [
[
["minecraft:torch", "minecraft:soul_torch", "minecraft:redstone_torch", "minecraft:campfire", "minecraft:soul_campfire"],
["#c:ores/coal"]
]
]
Opt-in isolation example, not a default: flint and steel can activate coal/dirt, an iron pickaxe can activate the optional uranium block, and a torch can activate either group. Missing optional block IDs match nothing and do not introduce a dependency.
ignitersAndReactors = [
[["minecraft:torch", "minecraft:flint_and_steel"], ["#c:ores/coal", "minecraft:dirt"]],
[["minecraft:torch", "minecraft:iron_pickaxe"], ["nuclearcraft:uranium_ore"]]
]
- First-side entries are item IDs or
#item-tags; second-side entries are block IDs or #block-tags. Use full namespaces. Surrounding whitespace is trimmed; syntax is validated.
- Unknown IDs and missing/empty tags match nothing. Fresh groups do not implicitly include
#coalexplosion:igniters; add it explicitly if wanted. That bundled item tag contains the five shipped items.
ignitersAndReactors = [] disables groups. Either side of an individual pair may also be empty, making that pair inactive.
- Malformed pairs are logged and skipped as whole groups. A wrong outer config type can trigger NeoForge correction/defaults.
- Groups are simple left/right-click mappings requesting immediate explosions. They do not configure mining, projectiles, neighbor ignition, probabilities, custom results, or gradual ignition.
Native group editor: add, edit, remove, save, or cancel
At the title screen, open Mods → Coal Explosion → Config → Common Configuration → General → Igniter and Reactor Groups → Edit Groups.... No loaded world is needed.
- Use Previous/Next to choose a group; Add Group creates an empty pair; Remove Group removes that pair from the draft. Removing all groups saves an empty array.
- Igniters and Reactive Blocks are separate scrollable text fields: one ID or
#tag per line. Blank lines are ignored and empty lists are supported.
- Save validates every group and persists the normal common config. Errors identify group, side, and line. Validation checks syntax, not whether an optional mod/tag is installed.
- Cancel/Escape discards this editor's detached draft without changing its live group value or saving. Navigation/resizing preserves the draft.
- If the group value changed elsewhere while the editor was open, Save refuses to overwrite it: cancel and reopen. A persistence exception restores the previous live group value, retains the draft, and shows an error.
- Other settings retain native NeoForge controls. Group Cancel does not undo earlier changes in those controls; Group Save uses a whole-file save and can also persist their pending edits. Native section Reset can reset groups.
- All labels are localized and tooltips are at most 30 words; detailed instructions are in config comments. Very long advanced rules may be easier to edit directly in TOML.
Advanced reaction rules and precedence
reactionRules is an ordered array of strings, each with three to five semicolon-separated fields:
block-or-#block-tag;ACTIVITY;item-or-#item-tag[;chance[;result-block]]
- Target: a block ID or block tag; while primed, matching uses the saved original state. No
* wildcard is supported.
- Activity: one of the nine activities below; names are case-insensitive.
- Filter: held item/ammunition ID or item tag, or a neighbor block/item identity for neighbor rules.
minecraft:air is the tool-independent wildcard; none requires an empty supplied item. Empty-handed clicks are rejected before matching.
- Chance: optional finite number from 0 to 1; omitted/blank means 1.0. Invalid values, activities, field counts, and result tags are rejected and logged.
- Result: omitted/blank means explode.
minecraft:fire or coalexplosion:primed_block requests ignition. An installed ordinary block ID replaces with its default state; minecraft:air removes the block.
Use fully qualified, case-sensitive IDs/tags. Missing target/tool IDs and tags match nothing. Group validation is stricter than the older advanced parser's unreliable unqualified-ID shorthand. Filters test IDs/tag membership, not enchantments, durability, components, names, or NBT. Neighbor tags may match the block or its block item's item tag.
Click priority: advanced rules run before groups. The first successful advanced click rule handles the interaction; if none succeeds, groups may still request an immediate explosion. Groups do not restrict advanced rules. Editing groups does not rewrite rules. A failed/zero-chance rule is not a deny rule and can fall through to a group. Clear both active arrays to disable all mod reactions.
Direct click, mining, projectile, and explosion processing stops at the first successful advanced rule. Neighbor/invisible progression has different loops and may process more than one rule; primed final resolution follows the order described below.
All nine supported activities
LEFT_CLICK: server-side player left-click on a block, using the event's held item.
RIGHT_CLICK: player right-click on a block, using that hand's item.
MINE: actual block-break event, using the main-hand item; distinct from merely left-clicking.
PROJECTILE: projectile block impact, burning or not. AbstractArrow supplies its origin/pickup ammunition; other projectile types supply an empty item.
BURNING_PROJECTILE: the same impact, but only while the projectile entity is actually on fire.
EXPLOSION: a position in an explosion's affected-block list; supplied item is empty, so normally use minecraft:air or none.
NEIGHBOR_IGNITE: notified adjacent faces after neighbor updates, all six faces after placement, and tracked rechecks; the filter describes the neighbor.
ON_FIRE_TICK: invisible burning progression; in primed mode, a specialized one-time hook for adjacent fire at ignition.
BURN_TICK: invisible burning progression or final resolution of a primed block.
Opt-in flaming arrows, without changing ordinary projectile behavior
Append this string to your existing reactionRules array to retain its other rules:
"#c:ores/coal;BURNING_PROJECTILE;#minecraft:arrows;1.0;minecraft:fire"
Or use this complete replacement array if it should be the only advanced rule:
reactionRules = [
"#c:ores/coal;BURNING_PROJECTILE;#minecraft:arrows;1.0;minecraft:fire"
]
This starts coal's warning only if the arrow is burning at impact. It checks the actual projectile's isOnFire(), not the shooter's fire state, a Flame enchantment alone, or an invented flaming-arrow item. Extinguished arrows do not qualify; arrows ignited by another mechanism can. Use ammunition IDs/tags, not bow/crossbow IDs or the owner's current hand.
Existing PROJECTILE rules still accept cold and burning projectiles. Both activities share one ordered pass: an earlier successful ordinary rule can handle the impact before a later burning-only rule. Player-owned, mob-owned, and ownerless/dispenser-style projectiles are accepted; no owner/team/claims condition exists. Non-arrow projectile classes supply an empty item and require a suitable wildcard/empty filter. Entity hits and misses are not triggers.
Alternative: #c:ores/coal;BURNING_PROJECTILE;minecraft:arrow;1.0 requests an immediate explosion instead of a warning. It filters the normal arrow item, not every ammunition item in a tag. No projectile rule is shipped enabled.
TOML allows only one assignment per key in a section. Edit the existing array; do not paste a second reactionRules key. Replacing the array removes its previous mining, neighbor, and progression examples.
Consumption, Creative mode, cancellation, and output safety
- A successful advanced/group right-click consumes one whole held item outside Creative, cancels normal use, and returns success. A tool used this way is consumed as an item, not damaged by one durability point.
- Advanced left-click cancels normal handling without consuming the item. Group left-click preserves historical PASS/non-cancel behavior while requesting an explosion.
- A successful mining rule cancels ordinary breaking and its normal drops; the mod adds no tool consumption or durability damage.
- A successful projectile rule cancels normal impact but does not discard the projectile or consume extra ammunition/owner items. The projectile can continue flying. Vanilla shooting costs remain separate.
- Explosion rules do not cancel/remove the original explosion's affected positions. Its blast can still affect newly placed non-resistant results.
- Missing output IDs can be handled no-ops in direct rules: cancellation/right-click consumption can still happen. Check output IDs carefully.
- Direct replacement uses a block's default state and does not preserve inventory or properties. This is not a general inventory-preserving transformation system.
- Use
minecraft:fire for portable ignition. Other fire blocks are treated as ignition by the generic direct handler, but specialized primed tick hooks recognize exact markers differently; soul fire is not interchangeable everywhere.
- Other mods' cancellations, vanilla rules, resistance, and explosion behavior can affect the interaction. There is no permissions/claims integration or guaranteed alternate-drop system.
Primed warning: sound, particles, and an animated visual cycle
With primedIgnition = true, an ignition result attempts to create coalexplosion:primed_block, recording the original state, root family, vein budget, and fuse/spread deadlines. Each new primed block plays the vanilla TNT fuse sound, emits a prime-fuse event, and has smoke/occasional flame particles.
Its faces repeat coal-block pattern → bright white coal pattern → black/dark magma pattern. Three 16×16 frames last five ticks each, with no interpolation. This is a global texture-atlas animation, not a per-block fuse clock: a new block can start in any phase. The dark magma frame is only a visual warning; it does not commit or bias the final result. Healthy coal textures are untouched.
The temporary block is unbreakable in Survival, highly blast resistant, and piston-immovable. It has no block item, recipe, loot table, or creative-tab entry. Air, already-primed states, block-entity blocks, and fluid-containing/waterlogged states cannot normally prime. A failed root attempt falls back to invisible burning; a failed spread candidate is skipped. Manual malformed primed blocks are not a supported setup method.
Gradual spread, final magma/explosion outcomes, and persistence
Each newly primed block attempts one spread step after its stored delay, then resolves at its own fuse deadline. This produces a staggered front rather than converting a whole vein instantly. Nominally 20 ticks equal one second; lag changes wall-clock timing.
RULE_FAMILY: same original block type or the root rule's target ID/tag; the coal tag can connect ordinary and deepslate ore.
SAME_BLOCK: only the current original block type.
ANY_REACTIVE: same type or a block named by any group/rule, regardless of that other mapping's activity/chance.
NONE: no spread beyond the root.
Diagonal spread checks 26 surrounding positions; otherwise only six faces. Candidates must be loaded, eligible, and within the live vein budget and loaded-primed cap. Spread does not force-load candidate chunks or retry skipped candidates. Root item filters/chance are not independently rerolled for each child.
At fuse completion, ordered matching BURN_TICK rules inspect the original state, ignoring their item field. Exact normal-fire/primed-block results are skipped to avoid restarting the fuse. The first successful explosion or usable concrete result wins; unknown outputs are skipped. If no rule resolves the block, magmaChance selects the fallback block or an explosion. An invalid magmaResultBlock falls back to vanilla magma.
The 0.25 default is a fallback chance, not an overriding final percentage. Earlier BURN_TICK rules run first. With the exact shipped rules and zero bonuses, total final magma probability is approximately 25.5025% per block. Setting magmaChance to 0 or 1 does not override earlier output/explosion rules; remove those rules for deterministic fallback behavior.
Primed ON_FIRE_TICK processing is a one-time ignition hook for exact minecraft:fire outputs, ignoring the tool field. It does not run arbitrary ON_FIRE replacements. Other fire outputs may be literal blocks in specialized final processing and disappear if unsupported.
Deadlines and original states are saved with primed block entities and use scheduled ticks. Existing deadlines do not reset on config edits; new children use current timing. Loaded-position tracking is released on removal/unload. Vein budget snapshots can be reconstructed after unload/restart, so the limit is a bounded live budget, not an exact persistent lifetime counter across every history.
Invisible burning, neighbor ignition, and optional lava
If priming is disabled or a root cannot prime, the original block remains invisibly tracked. The mod tries valid fire above first, then horizontally. causeFire = false controls explosion-created fire, not this initial ignition fire.
Invisible burning progresses through ON_FIRE/BURN rules using empty-item filters and the tracker cooldown. It has no temporary block, saved fuse, primed spread step, or magmaChance fallback. More than one applicable rule can execute as transformations progress. These in-memory watch/burn jobs are not serialized and are cleared on level unload.
Neighbor detection uses relevant adjacent faces and watched rechecks; unignited watches are removed when the source disappears. With treatLavaAsMagma = true, lava counts as magma for bonuses and is presented as fire for neighbor matching. A fire-neighbor rule can then ignite ore beside lava. An explicit lava filter is not equivalent under that substitution. With the option false, an explicitly configured lava rule can still match. Lava treatment is off by default to avoid broad cascades.
Neighbor modifiers, cooldowns, blast range, and safety caps
Eligible chance calculations add six-face fire/magma/coal-like/flammable bonuses and clamp the result to 0–1. These bonuses apply to explosion-result BURN_TICK rules and EXPLOSION-activity rules, not every trigger. Coal-like includes the coal tag or blocks named by any active group/rule; flammable excludes air, fire, magma-like, and coal-like blocks. Diagonal spread does not change these six-face counts.
Zero base chance is not a universal disable: eligible positive bonuses can raise it, and failed click rules can fall through to groups. Remove applicable mappings for safety; there is no negative/deny rule or exempt-tool override.
chanceCooldownTicks controls tracked progression/rechecks and direct probabilistic attempts. Guaranteed direct rules bypass that gate. A failed attempt can reserve a position's cooldown and suppress later probabilistic rules. Primed final resolution does not use that direct cooldown. It is not a universal debounce of all events.
Final blast radius is max(0, explosionRange + adjacentCoalLike * coalExplosionRangeBonus + adjacentFlammable * flammableExplosionRangeBonus + adjacentMagma * magmaExplosionRangeBonus). Bonuses can raise the final radius above the base option's maximum. There is no independent explosion-strength setting in this version.
explosionChainLimit bounds nested mod-generated explosion depth including the root; zero suppresses mod explosion calls, not all transformations/ignitions or a preexisting vanilla blast. A suppressed blast does not undo item consumption or restore an already removed primed block.
maxTrackedBlocks limits watched/invisible positions per dimension. Burning can evict watches first; immediate events may still react at the tracking cap.
maxPrimedBlocks limits loaded primed positions per dimension. A capped root can fall back to invisible burning; capped spread candidates are skipped.
veinScanLimit includes the root and bounds a live ignition budget.
- Parsed settings are cached and primed timing uses scheduled ticks, not whole-world scans. Only explicit primed spread has the stated no-force-loading guarantee; fallback tracker reads have different limits.
Caps are safeguards, not a lag-proof promise. Large radii, broad tags, overlapping rules, and increased caps can still be destructive and expensive. Test a backed-up world first.
All 26 common settings: defaults and allowed values
All entries belong to [general]. Numeric bounds are inclusive; booleans accept true/false. Empty active arrays are valid. Wrong option types can trigger NeoForge correction/defaults.
| Setting | Default | Range / role |
explosionRange | 5.0 | 0..256; base radius before neighbor additions |
causeFire | false | Request fire from mod explosions |
ignitersAndReactors | One five-item / coal-tag group | Nested two-list pairs; empty outer/sides allowed |
reactionRules | 21 rules described above | Ordered 3–5-field strings; empty allowed |
neighborFireChanceBonus | 0.0 | 0..1 per adjacent fire, for eligible chance calculations |
neighborMagmaChanceBonus | 0.0 | 0..1 per adjacent magma-like block |
neighborCoalChanceBonus | 0.0 | 0..1 per adjacent coal-like/reactive block |
neighborFlammableChanceBonus | 0.0 | 0..1 per qualifying flammable neighbor |
coalExplosionRangeBonus | 0.0 | 0..64 radius per adjacent coal-like/reactive block |
flammableExplosionRangeBonus | 0.0 | 0..64 radius per qualifying flammable neighbor |
magmaExplosionRangeBonus | 0.0 | 0..64 radius per magma-like neighbor |
treatLavaAsMagma | false | Lava enters magma counts and becomes fire for neighbor matching |
chanceCooldownTicks | 20 | 1..200 ticks; cooldown qualifications explained above |
explosionChainLimit | 8 | 0..64 nested mod explosion depth |
maxTrackedBlocks | 256 | 1..4096 watched/invisible positions per dimension |
primedIgnition | true | Use temporary warning blocks for eligible new roots |
warningTicks | 80 | 1..1200 ticks; nominal four-second fuse |
spreadTicks | 4 | 1..200 ticks before each block’s one spread attempt |
magmaChance | 0.25 | 0..1; final fallback only, after BURN_TICK rules |
magmaResultBlock | minecraft:magma_block | Concrete fallback output; invalid/unknown falls back to vanilla magma |
veinScanLimit | 64 | 1..4096; live vein budget including root |
maxPrimedBlocks | 1024 | 1..4096 loaded primed blocks per dimension |
spreadMode | RULE_FAMILY | RULE_FAMILY, SAME_BLOCK, ANY_REACTIVE, NONE |
spreadDiagonally | true | 26 surrounding candidates instead of six faces |
configuredIgniters | Five torch/campfire IDs | Retained one-time compatibility input, not a second active global list |
configuredBlocks | ["#c:ores/coal"] | Retained one-time compatibility input, not a second active global list |
Existing configurations and compatibility migration
If coalexplosion-synced.toml exists and the common file does not, the mod attempts a one-way rename to coalexplosion-common.toml. If both exist, the common file wins; the other file is not merged/deleted. Check logs for rename errors.
For an existing common file without general.ignitersAndReactors, migration reads the old configuredIgniters/configuredBlocks before defaults are inserted. It creates one combined group, preserving their old all-to-all relationship inside that group, and explicitly adds #coalexplosion:igniters because the old click path always included that tag. Empty old block lists remain disabled; invalid old entries are not silently promoted into new matching behavior. Original key strings remain untouched.
A backup named coalexplosion-common.toml.pre-groups.bak is created if absent before saving migrated groups. Migration failure stops loading instead of silently substituting new group defaults. Once the group key exists, even as [], it is authoritative: later old-list edits do not merge back or reactivate groups. Existing advanced rules retain their semantics; migration does not enable burning arrows.
Verification and realistic limitations
The real headless GameTest suite passed 16/16 required tests, including the vanilla always-pass test. Coverage includes real arrow fire states/impact events, filters and owners, old grammar, group isolation/migration, editor model/save/cancel/conflict handling, defaults, priming/spread/outcomes, lava behavior, assets, and tooltip length. The extracted source archive was independently rebuilt and tested.
The custom screen and animated warning have not been graphically verified here. Server tests do not prove appearance, layout, smoke, or sound. Tests also do not simulate every full arrow flight through water, optional mod/tag, event conflict, or restart/unload history. Delayed primed blasts do not preserve shooter attribution. No new ores/worldgen, recipes, safe-tool list, independent strength option, owner selectors, permission system, remote configuration, or custom warning HUD is implemented.
Older versions
The settings, examples, and historical plans below describe older releases or earlier design ideas. They are not the NeoForge 26.3 configuration reference.
Earlier configurable settings
Range (historical default = 5.0, min 0 max 256.0): The range of the explosion of a coal block.
Strength (historical default = 10.0, min 0, max 256.0): The amount of damage the explosions do.
causeFire (historical description: default = false): Whether an exploding coal block should cause fire.
Sparks (historical 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
This preserved older-version example is not the current default configuration. In particular, its causeFire value is true.
[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"]
Historical planned features for older versions
The following is preserved historical planning text, not a promise that every proposal was implemented. Refer to the version-specific documentation for actual settings and behavior.
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.
Reminder: the paragraphs above are historical plans, not evidence of an implemented exempt-tool list or separate strength setting.

Fabric Versions require Fabric API and ClothConfig
Recommend Mod Companions:
评论 0
登录后参与评分
还没有评论,来抢沙发吧