Skip to content

Repository files navigation

AllBlockExplosion (ab_explosion)

既存ブロックを、バニラTNTと同じ要領で起爆できる Minecraft Forge 1.20.1 向けジョークMODです。 リポジトリのフォルダ名は AllBlockExprosion のままですが、MOD ID とコード上の名称には ab_explosion / AllBlockExplosion を使用します。

現在の実装

  • 火打石と打金でブロックを右クリックすると、そのブロックが起爆済みエンティティになる
  • 起爆済みエンティティは元の BlockState のモデルとテクスチャを表示する
  • 白い点滅、最後の膨張、導火線80 tick、移動、煙、爆発力4はバニラTNT準拠
  • 火打石と打金の耐久消費、使用統計、着火音、ゲームイベントもバニラTNT準拠
  • 火打石と打金専用エンチャント「起爆拡張」を追加。無印は木、Iは石、IIは鉄、 IIIはダイヤ、IVはネザライト相当の起爆Tierを持つ
  • 火打石と打金専用エンチャント「火種愛着」I~Vを追加。モブへの直接攻撃で5~9秒炎上させ、 着火時はレベルごとに15%の確率で耐久値を消費しない
  • アイテムとブロックは追加しない(汎用の起爆済みエンティティのみ追加)

今回の制限

  • チェスト内の内容、看板の文字、旗の模様など、BlockEntity のデータと専用描画は引き継がない
  • 表示されるのは保存した BlockState に対応する通常のブロックモデル
  • 正式な共通設定は定義済み。全体スイッチ、火打石スイッチ、空気除外、BANリストは 共通起爆ゲートを通して現在の火打石処理へ接続済み
  • プレイヤー採掘、レッドストーン信号、炎の延焼も共通起爆ゲートへ接続済み
  • 爆発確率、導火線の有無とtick数、爆発威力を設定へ接続済み
  • 起爆元ブロックのドロップ、ルートテーブル、BlockEntity NBT保持を設定へ接続済み
  • 周囲のブロック破壊、エンティティへのダメージ、ノックバック、落ちているアイテムの消去を独立制御可能
  • 起爆済みブロックの飛散は通常のノックバックから分離し、scatterPrimedEntities で制御
  • 爆風による同種・異種ブロックの誘爆、爆発耐性と距離減衰の参照を設定へ接続済み
  • 誘爆は世代数と一爆発あたりの子数で制限し、低TPS時は候補を蓄積せず停止する

共通設定

config/ab_explosion-common.toml に次の区分で生成されます。

  • general: 全体スイッチと起爆BANリスト
  • triggers: プレイヤー採掘、レッドストーン、火打石、炎の延焼
  • priming: 起爆時の採掘Tier要求
  • explosion: 威力、確率、導火線、ブロック破壊、ダメージ、ノックバック、アイテム消去
  • drops: 起爆元ブロックのドロップ、BlockEntity NBT、ルートテーブル
  • chainReaction: 同種・異種誘爆、起爆済みエンティティの飛散、爆発耐性、距離減衰、 誘爆世代・子数上限、TPS停止/再開閾値と再判定間隔

確率は 0.00 から 1.00 まで、0.01 刻みです。起爆BANリストにはビーコン、 エンダーチェスト、管理用ブロック、ポータル類などが初期登録されています。

開発環境

  • Minecraft 1.20.1
  • Forge 47.4.22
  • Java 17

ライセンス

MIT License — Copyright (c) 2026 Pendiv

Glory Reenactment

  • ab_explosion:glory_reenactment has five levels and can be applied to flint and steel or swords.
  • With a block item in the offhand, right-clicking launches that block along the player's view direction.
  • The projectile uses TNT power (4.0), cannot create blast chain reactions, and otherwise follows this mod's explosion damage, destruction, knockback, item-removal, fuse, ban-list, and source-drop settings.
  • It adds 35% of the launch-time attack-damage attribute per enchantment level, attenuated by the same distance and exposure relationship as the TNT damage.
  • When L2 Damage Tracker is installed, its l2damagetracker:explosion_damage attribute automatically scales the whole explosion through the normal explosion damage source; no hard dependency is required.

Explosion power calculation

Normal primed blocks calculate power in this order: configured base power, required-mining-tier bonus, additive random range, then final proportional variance. powerRange supplies a symmetric -range through +range shorthand; powerRangeMinimumOffset and powerRangeMaximumOffset can widen or asymmetrically replace that range when the symmetric value is zero. Mining tier 1 is wood-equivalent, tier 2 is stone, tier 3 is iron, tier 4 is diamond, and tier 5 is netherite. Registered modded Forge tiers use their tier level in the same calculation.

At or above denseRayMinimumPower, optional dense-ray block destruction replaces vanilla's fixed cube-surface directions with evenly distributed Fibonacci-sphere rays. Explosion resistance, shielding, block drops, entity damage and knockback still use the normal explosion pipeline. Ray density, maximum ray count, maximum steps and per-ray crater noise are configurable safety and shape controls. The shipped threshold default is power 15.

Priming Expansion also increases vanilla TNT power by 2 per enchantment level when the TNT is lit by the enchanted flint and steel. Its existing mining-tier behavior for generic block priming remains unchanged.

Play-mode profiles

The two root config lines are a one-shot profile command and an automatically detected status. Write Normal, Hard, or Infinity to playMode and save the file. The selected profile overwrites every setting, currentPlayMode is updated, and playMode is cleared again. Afterward, individual values can be customized normally; any deviation from all known profiles makes currentPlayMode blank.

  • Normal is the default ordinary-play profile: 12% player-mining priming, loot-preserving source drops, vanilla-strength safety behavior, and no chain reactions.
  • Hard enables every trigger, 25% priming, source/item removal, a shorter fuse, and same/different-block propagation capped at five generations and eight children per explosion. TPS pausing remains enabled.
  • Infinity removes the ban list, mining requirement, resistance/falloff limits, and practical generation/child/ray limits. It keeps only a low-TPS chain cutoff and is intentionally unsafe for real worlds.

About

Div's mod repository

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages