All versions
1.5.0
Release
C4 Pro 1.5.0last week 330
Uploaded by
Compatibility
Minecraft: Java Edition
1.20.1
Platform
Forge
Supported environments
Client and server
Changes
C4 Pro v1.5.0
🚀 新增功能
1. 拆除队伍白名单
- 新增
allowed_defuse_teams配置项,只有指定队伍的玩家可以拆除C4 - 空列表表示任何队伍都可以拆除
- 配置示例:
allowed_defuse_teams = ["red", "blue"]
2. 空手拆除C4(待实现)
- 允许玩家空手拆除C4,方法与剪刀拆除相同,但需要10秒
- 拆除过程中切换物品或移动会中断拆除
- 状态:计划中,将在后续版本实现
3. C4掉落系统
- 当玩家在
保留物品栏游戏规则开启时被击杀,身上的C4会在死亡位置掉落 - 掉落时在聊天栏广播C4掉落位置坐标
- 只有安装队伍(
allowed_install_teams)的玩家可以拾取C4 - 不允许拾取的队伍捡起C4时会立即被清除并在脚底掉落
4. C4全局清除指令
- 新增
/c4clear指令(需要OP权限) - 可清除整个存档所有已加载的C4实体
- 执行后显示清除的C4数量
🔧 功能优化
1. 拆除逻辑重构
- 拆除改为基于时间戳计时,不再受服务器TPS影响
- 先拆除的玩家优先,后续玩家尝试拆除会被阻止并提示
- 拆除过程中移动或切换物品会自动中断
- 支持视角射线检测,需要玩家看着C4才能拆除
2. UI系统优化
- 新增独立UI显示系统,位于Action Bar上方
- 安装/拆除倒计时精确到0.1秒
- UI提示仅在安装/拆除时显示,其他时间自动隐藏
- 提示信息不再占用Action Bar,避免与其他模组冲突
3. 队伍检测优化
- 使用原版队伍API检测玩家队伍
- 添加0.5秒缓存,减少性能开销
- 移除所有调试日志输出
4. 计分板系统扩展
- 新增
p1score、p2score、p3score计分板 - 在虚拟玩家
#C4中存储C4的XYZ坐标(整数) - C4状态计分板
c4_condition功能保留
5. C4实体优化
- C4安装后强制加载所在区块,保证倒计时正常进行
- C4被拆除或爆炸后自动卸载区块
- 只有剪刀可以拆除C4(拆除时间5秒)
🐛 Bug修复
- 修复局域网客端无法看到UI提示的问题
- 修复拆除时倒计时UI与整数UI冲突
- 修复C4队伍检测不生效的问题
- 修复C4掉落物粒子无法清除的问题
📊 配置文件更新
c4-common.toml 新增配置项:
# 允许安装C4的队伍名称列表(空列表表示任何队伍都可以)
allowed_install_teams = []
# 允许拆除C4的队伍名称列表(空列表表示任何队伍都可以)
allowed_defuse_teams = []
# 是否启用C4掉落功能(需要保留物品栏游戏规则开启)
enable_c4_drop = true
⚠️ 已知问题
- C4掉落物标记(火圈粒子)可能不稳定,建议搭配客户端高亮模组使用
📋 待办事项 (TODO)
- 空手拆除C4:允许玩家空手拆除C4,耗时10秒,与剪刀拆除逻辑一致
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle. To learn more about the Modrinth Maven API, click here.
Note: When available, you should use the creator's maven repo instead as it will have transitive dependency information that the Modrinth Maven API does not. You may also end up with duplicate dependencies if you use a mix of Modrinth and non-Modrinth Maven repositories for your dependencies, because the group identifier will be different when served through the Modrinth Maven API.
Maven coordinates:
Version ID:
build.gradle:
repositories {
exclusiveContent {
forRepository {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
}
}
// forRepositories(fg.repository) // Uncomment when using ForgeGradle
filter {
includeGroup "maven.modrinth"
}
}
}
// Standard Gradle dependency
dependencies {
implementation "maven.modrinth:vUcso7TS:j4tJQ0xB"
}
// Legacy Loom dependency
dependencies {
modImplementation "maven.modrinth:vUcso7TS:j4tJQ0xB"
}

