中文说明 / Chinese README
Block Durability
为 Minecraft 方块赋予耐久度,使枪击和爆炸能够逐渐破坏它们。

🎛️ 游戏内可视化管理中心(v2.1.1 新增)
无需再手动编辑 .toml 文件!输入 /bd config 或在模组列表中点击 Config 按钮,即可在 Minecraft 内部直接打开一个直观的、受 Advanced XRay 启发的管理中心:

- ✋ 一键手持方块: 在主手持有任意方块并点击,即可将其立即添加到破坏白名单。
- 👁️ 一键注视方块: 将准星对准世界中的任意方块并立即捕获。
- 🔍 全局方块浏览器: 通过实时 3D 物品图标浏览成千上万的方块,支持按本地化名称或 ID 进行模糊搜索。
- ⚡ 实时自动保存: 任何添加、删除或滑块切换(子弹伤害模式、硬度乘数、自动修复时间)都会立即写入磁盘。重新加入世界或重启游戏都不会丢失你的更改!
- ⚠️ 关于单方块 HP 的说明: GUI 通过
Hardness × Hardness Multiplier 动态计算方块 HP。目前 GUI 不支持直接自定义单方块 HP 输入。如果你需要为特定方块设置固定的自定义 HP(例如 minecraft:obsidian=50.0),请在 config/blockdurability-common.toml 中配置 blockHPOverrides。单方块可视化编辑计划在未来的更新中提供。
演示
RPG

Create 加农炮

3x3 高爆

爆炸喷溅

🔫 真实子弹威力 vs 固定伤害
你可以通过 GUI 或配置文件随时切换两种伤害计算模式:
- 真实子弹伤害 (
useBulletDamage = true):
- 伤害直接与 TaCZ 枪械的动能成比例缩放。
- 重型反器材狙击步枪能在更少的射击次数中击穿墙壁,而手枪则逐渐削减生命值。
- 固定伤害 (
useBulletDamage = false):
- 每发子弹造成固定的耐久度伤害 (
damagePerHit),非常适合 PvP 竞技平衡。
💥 爆炸耐久度
Block Durability 将爆炸冲击波直接连接到方块生命值上。白名单中的方块会根据距离受到耐久度伤害, visibly 出现裂纹,并最终破碎。
- TaCZ 爆炸: RPG、高爆手榴弹和炮弹会对范围内白名单中的方块造成径向、随距离衰减的耐久度伤害(包括那些通常不会改变地形的爆炸)。
- 原版和其他模组的爆炸: TNT 和苦力怕保持其原始的直接破坏行为。幸存于初始爆炸的白名单方块会继续受到基于距离的耐久度伤害。
- 掩护与遮挡: 爆炸和目标方块之间的实心碰撞方块有效地屏蔽并吸收了耐久度冲击波。
- 可配置: 爆炸伤害乘数、扫描半径、原版爆炸兼容性、方块白名单和 HP 计算均可完全配置。
仅影响白名单中的方块。最终结果取决于方块硬度、HP 覆盖值、爆炸位置和配置的伤害乘数。
🧱 黑曜石可以被摧毁
黑曜石不需要被分配任意固定的 HP 值。它的 HP 是根据其原版硬度自动计算的:
方块 HP = max(minBlockHP, 原版硬度 × 硬度乘数)
黑曜石的原版硬度为 50。当 hardnessMultiplier = 3.0 时,其计算出的 HP 为:
max(1.0, 50 × 3.0) = 150 HP
在 150 HP 的情况下,大约需要 20 到 30 发 Create 加农炮的高爆炮弹或重复的重型狙击火力才能打破黑曜石。该乘数也适用于所有其他方块,让你轻松微调服务器或整合包的平衡性。
📦 依赖项与兼容性
| Minecraft |
加载器 |
兼容 TaCZ |
备注 |
| 1.21.1 |
NeoForge (21.1.80+) |
TaCZ 1.2.0+ (官方发布) |
主要活跃开发分支 |
| 1.20.1 |
Forge (47.1.0+) |
TaCZ 1.0.x / 1.1.x / 1.2.0 |
长期支持分支 |
💡 注意: TaCZ 是可选依赖项。当安装 TaCZ 时,子弹命中和枪口爆炸会与耐久度系统交互。如果没有安装 TaCZ,Block Durability 将继续无缝配合原版 TNT、苦力怕和其他模组的爆炸工作!
✨ 功能摘要
- 游戏内 GUI: 按
/bd config 管理白名单、调整乘数并实时切换子弹威力。
- 白名单匹配: 完整支持方块标签(例如
tag:minecraft:planks, tag:c:glass_blocks)、精确 ID(minecraft:end_stone)和通配符(minecraft:*glass*)。
- 动态硬度公式: 根据原版破坏速度计算方块 HP,并提供可选的单方块覆盖值。
- 视觉裂纹阶段: 显示真实的 0~9 渐进式裂纹阶段、粒子爆发以及方块命中/破碎音效。
- 120 秒自动修复: 受损方块在 120 秒无活动后清除裂纹并恢复 HP(可通过
/gamerule blockDurabilityHealSeconds <seconds> 调整)。
⚙️ 配置
配置文件位于 config/blockdurability-common.toml(通过游戏内 GUI 修改时会自动更新):
[general]
enabled = true # 启用或禁用耐久度系统的主开关
useBulletDamage = false # 是否使用 TaCZ 子弹动能(true:真实伤害;false:固定伤害)
damagePerHit = 1.0 # 固定模式下每发子弹造成的耐久度伤害
bulletDamageMultiplier = 1.0 # 当 useBulletDamage 为 true 时应用的乘数
healTimeoutSeconds = 120 # 受损方块在恢复前的无操作秒数(设为 0 以禁用)
[hp_calculation]
hardnessMultiplier = 1.5 # 公式:方块 HP = 原版硬度 * 乘数
minBlockHP = 1.0 # 所有可破坏方块的最低 HP 下限
# 单个方块的 HP 覆盖值(优先级高于硬度公式;格式:"modid:block_id=hp",支持通配符)
blockHPOverrides = [
"minecraft:obsidian=50.0",
"minecraft:*glass*=1.0"
]
[explosion]
enabled = true # 启用爆炸产生的径向耐久度伤害
damageMultiplier = 1.0 # 爆炸冲击波的伤害乘数
maxRadius = 16.0 # 最大爆炸扫描半径(安全上限)
handleVanillaExplosions = true # 处理 TNT 和苦力怕的爆炸
[effects]
spawnBreakParticles = true # 击中时生成方块破碎粒子效果
playBreakSound = true # 播放方块被击中和破碎的声音效果
dropItems = false # 破碎的方块是否掉落标准物品
[whitelist]
# 可破坏方块的白名单(支持标签、精确 ID 和通配符)
blockWhitelist = [
"tag:c:glass_blocks",
"tag:c:glass_panes",
"tag:minecraft:planks",
"tag:minecraft:logs",
"tag:minecraft:leaves",
"tag:minecraft:wooden_doors",
"tag:minecraft:wooden_trapdoors",
"tag:minecraft:fences",
"tag:minecraft:fence_gates",
"tag:minecraft:wooden_stairs",
"tag:minecraft:wooden_slabs",
"tag:minecraft:wooden_buttons",
"tag:minecraft:wooden_pressure_plates",
"tag:minecraft:standing_signs",
"tag:minecraft:wall_signs",
"tag:minecraft:ceiling_hanging_signs",
"tag:minecraft:wall_hanging_signs"
]
中文说明 / Chinese README
Block Durability
Give Minecraft blocks durability, allowing gunfire and explosions to gradually break them.

🎛️ In-Game Visual Management Center (New in v2.1.1)
No more editing .toml files by hand! Type /bd config or press the Config button in your mod list to open an intuitive, Advanced XRay-inspired management hub directly inside Minecraft:

- ✋ One-Click Handheld Block: Hold any block in your main hand and click to instantly add it to the destruction whitelist.
- 👁️ One-Click Looked-At Block: Aim your crosshair at any block in the world and capture it immediately.
- 🔍 Global Block Browser: Browse through thousands of blocks with live 3D item icons and fuzzy search by localized name or ID.
- ⚡ Real-Time Auto-Save: Any additions, deletions, or slider toggles (Bullet Damage mode, Hardness Multiplier, Auto-Heal time) are immediately written to disk. Rejoining worlds or restarting the game will never lose your changes!
- ⚠️ Note on Per-Block HP: The GUI calculates block HP dynamically via
Hardness × Hardness Multiplier. Direct per-block HP custom input in the GUI is currently not supported. If you need to set a fixed custom HP for specific blocks (e.g. minecraft:obsidian=50.0), configure blockHPOverrides in config/blockdurability-common.toml. Per-block visual editing is planned for a future update.
Demos
RPG

Create Cannon

3x3 High Explosive

Explosion Spray

🔫 Realistic Bullet Power vs. Fixed Damage
You can toggle between two damage calculation modes on the fly via the GUI or config:
- Realistic Bullet Damage (
useBulletDamage = true):
- Damage scales directly with the kinetic energy of TaCZ firearms.
- Heavy anti-materiel sniper rifles punch through walls in fewer shots, while pistols gradually chip away health.
- Fixed Damage (
useBulletDamage = false):
- Every bullet deals a fixed amount of durability damage (
damagePerHit), ideal for PvP competitive balance.
💥 Explosion Durability
Block Durability connects explosion shockwaves directly to block health. Whitelisted blocks take durability damage based on distance, visibly crack, and eventually break.
- TaCZ explosions: RPGs, high-explosive grenades, and artillery shells deal radial, distance-attenuated durability damage to whitelisted blocks in range (including explosions that normally leave terrain unchanged).
- Vanilla and other mod explosions: TNT and Creepers maintain their original direct-destruction behavior. Whitelisted blocks surviving the initial explosion continue taking distance-based durability damage.
- Cover & Obstruction: Solid collision blocks between an explosion and a target block effectively shield and absorb durability shockwaves.
- Configurable: Explosion damage multiplier, scan radius, vanilla-explosion compatibility, block whitelist, and HP calculations are fully configurable.
Only whitelisted blocks are affected. The final result depends on block hardness, HP overrides, explosion position, and the configured damage multiplier.
🧱 Obsidian Can Be Destroyed
Obsidian does not need to be assigned an arbitrary fixed HP value. Its HP is calculated automatically from its vanilla hardness:
Block HP = max(minBlockHP, vanilla hardness × hardnessMultiplier)
Obsidian has a vanilla hardness of 50. With hardnessMultiplier = 3.0, its calculated HP is:
max(1.0, 50 × 3.0) = 150 HP
At 150 HP, it takes roughly 20 to 30 Create cannon high-explosive shells or repeated heavy sniper fire to break obsidian. The multiplier applies to all other blocks as well, allowing you to fine-tune server or modpack balance effortlessly.
📦 Dependencies & Compatibility
| Minecraft |
Loader |
Compatible TaCZ |
Notes |
| 1.21.1 |
NeoForge (21.1.80+) |
TaCZ 1.2.0+ (Official Release) |
Main active development branch |
| 1.20.1 |
Forge (47.1.0+) |
TaCZ 1.0.x / 1.1.x / 1.2.0 |
Long-term support branch |
💡 Notice: TaCZ is an optional dependency. When TaCZ is installed, bullet hits and gun explosions interact with the durability system. Without TaCZ, Block Durability continues to work seamlessly with vanilla TNT, Creepers, and other mod explosions!
✨ Features Summary
- In-Game GUI: Press
/bd config to manage whitelists, adjust multipliers, and toggle bullet power in real time.
- Whitelist Matching: Full support for block tags (e.g.
tag:minecraft:planks, tag:c:glass_blocks), exact IDs (minecraft:end_stone), and wildcards (minecraft:*glass*).
- Dynamic Hardness Formula: Block HP calculated from vanilla destroy speed, with optional per-block overrides.
- Visual Cracking Stages: Displays authentic 0~9 progressive crack stages, particle bursts, and block hit/break sound effects.
- 120s Auto-Healing: Damaged blocks clear cracks and recover HP after 120 seconds of inactivity (adjustable via
/gamerule blockDurabilityHealSeconds <seconds>).
⚙️ Configuration
The config file is located at config/blockdurability-common.toml (auto-updated when modified via the in-game GUI):
[general]
enabled = true # Master switch to enable or disable the durability system
useBulletDamage = false # Whether to use TaCZ bullet kinetic energy (true: real damage; false: fixed)
damagePerHit = 1.0 # Durability damage dealt per bullet in fixed mode
bulletDamageMultiplier = 1.0 # Multiplier applied when useBulletDamage is true
healTimeoutSeconds = 120 # Inactivity seconds before damaged blocks heal (0 to disable)
[hp_calculation]
hardnessMultiplier = 1.5 # Formula: Block HP = vanilla hardness * multiplier
minBlockHP = 1.0 # Minimum HP clamp for any breakable block
# Per-block HP overrides (takes priority over hardness formula; format: "modid:block_id=hp", supports wildcards)
blockHPOverrides = [
"minecraft:obsidian=50.0",
"minecraft:*glass*=1.0"
]
[explosion]
enabled = true # Enable radial durability damage from explosions
damageMultiplier = 1.0 # Damage multiplier for explosion shockwaves
maxRadius = 16.0 # Maximum explosion scan radius (safety clamp)
handleVanillaExplosions = true # Handle TNT and Creeper explosions
[effects]
spawnBreakParticles = true # Spawn block break particles when hit
playBreakSound = true # Play block hit and break sound effects
dropItems = false # Whether broken blocks drop standard items
[whitelist]
# Whitelist of breakable blocks (supports tag:, exact ID, and wildcards)
blockWhitelist = [
"tag:c:glass_blocks",
"tag:c:glass_panes",
"tag:minecraft:planks",
"tag:minecraft:logs",
"tag:minecraft:leaves",
"tag:minecraft:wooden_doors",
"tag:minecraft:wooden_trapdoors",
"tag:minecraft:fences",
"tag:minecraft:fence_gates",
"tag:minecraft:wooden_stairs",
"tag:minecraft:wooden_slabs",
"tag:minecraft:wooden_buttons",
"tag:minecraft:wooden_pressure_plates",
"tag:minecraft:standing_signs",
"tag:minecraft:wall_signs",
"tag:minecraft:ceiling_hanging_signs",
"tag:minecraft:wall_hanging_signs"
]
评论 0
登录后参与评分
还没有评论,来抢沙发吧