概览
GD656LightCore 是一款客户端 Minecraft 模组,为 TACZ 枪械添加了动态光照效果——提供实时枪口闪光、弹道轨迹、子弹命中以及爆炸光照特效,并具备高度可配置性。
最后更新:2026年7月18日。部分功能可能尚未完全记录或存在变更。
兼容性
- 需要 TACZ (Timeless and Classics Zero) 1.1.7-hotfix 或更高版本;
- 与 Explosive Enhancement 软兼容 —— 检测其爆炸粒子以生成额外光照效果;
- 目前仅支持 Minecraft 1.20.1 Forge。
服务器安装
该模组分为客户端和服务端功能。绝大多数功能仅需安装客户端即可生效。
无需服务端安装即可使用的功能:
| 功能 |
说明 |
| 自身枪口闪光光照 |
监听客户端 GunFireEvent,本地处理 |
| 弹道轨迹光照 |
在客户端渲染时遍历 EntityKineticBullet 实体 |
| 子弹命中光照 |
Mixin 注入客户端 LevelRenderer.addParticle,检测子弹孔洞粒子 |
| 爆炸光照 |
Mixin 注入客户端 LevelRenderer.levelEvent / 粒子事件,覆盖原版、TACZ 及 Explosive Enhancement 的爆炸效果 |
| 配置与命令系统 |
/gd656lightcore 客户端命令,纯客户端侧配置 |
需要服务端安装的功能:
| 功能 |
说明 |
| 其他玩家的枪口闪光光照 |
服务端通过 MuzzleFlashSyncPacket 向附近客户端广播枪口位置和枪械 ID |
简而言之:单人游戏或独立运行完全不受影响。在多人游戏中,若未安装服务端模组,则缺少其他玩家的枪口闪光光照 —— 弹道轨迹、命中光效和爆炸光效均正常渲染。服务端同步数据量极小(仅坐标和枪械 ID),对服务器负载影响微乎其微。
配置与命令
所有参数均可通过 Forge 模组配置界面进行调整,或使用游戏内客户端命令:
/gd656lightcore config list 列出所有配置项及其当前值
/gd656lightcore config edit <key> <value> 修改某个配置项
/gd656lightcore config reset 重置所有设置为默认值
/gd656lightcore config reset <key> 重置特定设置至默认值
别名 /gdlc 用法相同。所有更改立即生效并自动保存。
注意事项
- 所有视觉特效均为客户端渲染,不影响服务器稳定性;
- 本模组处于早期开发阶段(0.x);功能可能持续演进;
- 部分代码由 AI 技术辅助生成;
- 采用 MIT License 授权。
功能
枪口闪光光照
当玩家开火时,会在枪口位置生成一个瞬时光源,亮度在配置的最小值和最大值之间随机选择。
- 按武器类型缩放持续时间:狙击/DMR 默认为 3×,重型/RPG 默认为 7×;
- 单发武器(仅限半自动)始终使用最大亮度(等级 15);
- 通过枪械 ID 路径关键词自动检测武器类型(例如
sniper、rpg、heavy);
- 默认枪口闪光持续时间为 40ms(可调范围 1–200ms);
- 按区块去重防止快速连续闪光叠加。
弹道轨迹光照
在子弹飞行过程中沿弹道放置动态光源,模拟曳光弹或摩擦发光效果。
- 7 种武器类别拥有独立设置:步枪、霰弹枪、冲锋枪、重型、机枪、手枪、狙击,以及一个备用默认值 —— 每种亮度均可调 0–15;
- 每约 0.4 个方块间隔采样一次,最多每个子弹 24 个样本,确保远距离射击时弹道光照连续;
- 枪口周围 2 个方块的排除区域避免与枪口闪光光照重叠;
- 弹道光源默认持续 80ms,自然衰减。
子弹命中光照
子弹击中方块时生成的弹孔粒子会触发单次闪光。
- 从 TACZ 弹孔粒子中读取枪械 ID 以匹配相应的亮度配置;
- 单发武器自动使用最大亮度 15,共享强制光照逻辑(与枪口闪光一致)。
爆炸光照
在爆炸中心周围生成球形动态光照区域,强度随距离衰减。
- 覆盖原版爆炸(TNT、苦力怕等)、TACZ 武器爆炸以及 Explosive Enhancement 粒子效果;
- 爆炸半径约 4.5 个方块,强度从等级 15 向外衰减,边缘低于等级 2 的部分被裁剪;
- 独立开关与持续时间配置(默认 0.3s,最大 60s);
- 分帧处理:每帧最多处理 3 个待处理爆炸,最多排队 96 个,防止大规模爆炸导致卡顿。
性能控制
- 同时存在的最大光源数:可调 64–65536(默认 4096);超出限制时保留高亮度光源,裁剪低亮度光源;
- 各类光源拥有独立开关,允许禁用未使用的特效;
- 维度切换时自动清除光照数据,防止跨维度光照伪影。
Overview
GD656LightCore is a client-side Minecraft mod that adds dynamic lighting to TACZ firearms — providing real-time muzzle flash, bullet trail, bullet impact, and explosion lighting effects with high configurability.
Last updated: July 18, 2026. Some features may not be fully documented or are subject to change.
Compatibility
- TACZ (Timeless and Classics Zero) 1.1.7-hotfix or later is required;
- Soft compatibility with Explosive Enhancement — detects its explosion particles for additional lighting effects;
- Currently supports Minecraft 1.20.1 Forge only.
Server Installation
This mod is split into client-side and server-side functionality. The vast majority of features work with only a client installation.
Features that work without server installation:
| Feature |
Notes |
| Own muzzle flash lighting |
Listens to client-side GunFireEvent, processed locally |
| Bullet trail lighting |
Iterates over EntityKineticBullet entities in client rendering |
| Bullet impact lighting |
Mixin-injected into client LevelRenderer.addParticle, detects bullet hole particles |
| Explosion lighting |
Mixin-injected into client LevelRenderer.levelEvent / particle events, covers vanilla, TACZ, and Explosive Enhancement explosions |
| Config & command system |
/gd656lightcore client commands, pure client-side configuration |
Feature that requires server installation:
| Feature |
Notes |
| Other players' muzzle flash lighting |
Server broadcasts muzzle position and gun ID via MuzzleFlashSyncPacket to nearby clients |
In short: single-player or standalone use is fully unaffected. In multiplayer, only other players' muzzle flash lighting is missing without the server mod — bullet trails, impact lights, and explosion lights all render normally. Server sync data is minimal (only coordinates and gun ID), with negligible server load.
Configuration & Commands
All parameters can be adjusted via the Forge mod config screen, or through in-game client commands:
/gd656lightcore config list List all config entries with current values
/gd656lightcore config edit <key> <value> Modify a config entry
/gd656lightcore config reset Reset all settings to defaults
/gd656lightcore config reset <key> Reset a specific setting to default
The alias /gdlc works identically. All changes take effect immediately and are saved automatically.
Notes
- All visual effects are client-side rendered and do not affect server stability;
- This mod is in early development (0.x); features may continue to evolve;
- Portions of the code were assisted by AI technology;
- Licensed under the MIT License.
Features
Muzzle Flash Lighting
When a player fires, a transient light source is generated at the muzzle position, with brightness randomly chosen between the configured minimum and maximum.
- Per-weapon-type duration scaling: sniper/DMR default 3×, heavy/RPG default 7×;
- Single-shot weapons (semi-auto only) always use maximum brightness (level 15);
- Automatic weapon type detection via gun ID path keywords (e.g.,
sniper, rpg, heavy);
- Default muzzle flash duration 40ms (adjustable 1–200ms);
- Per-block deduplication prevents stacking from rapid repeated flashes.
Bullet Trail Lighting
Dynamic lights are placed along bullet trajectories during flight, simulating tracer or friction glow effects.
- 7 weapon categories with independent settings: rifle, shotgun, SMG, heavy, MG, pistol, sniper, plus a fallback default — each brightness adjustable 0–15;
- Trail sampling at ~0.4 block intervals, up to 24 samples per bullet, ensuring continuous trail lighting for long-range shots;
- A 2-block exclusion zone around the muzzle avoids overlap with muzzle flash lighting;
- Trail lights default to 80ms duration, decaying naturally.
Bullet Impact Lighting
Bullet hole particles generated on block impact trigger a single flash of light.
- Reads the gun ID from TACZ bullet hole particles to match the appropriate brightness config;
- Single-shot weapons automatically use max brightness 15, sharing the forced-light logic with muzzle flash.
Explosion Lighting
A spherical area of dynamic light is generated around explosion centers, with intensity fading by distance.
- Covers vanilla explosions (TNT, Creepers, etc.), TACZ weapon explosions, and Explosive Enhancement particle effects;
- Explosion radius ~4.5 blocks, intensity fades from level 15 outward, edges below level 2 are trimmed;
- Independent toggle and duration config (default 0.3s, max 60s);
- Frame-split processing: up to 3 pending explosions processed per frame, max 96 queued, preventing lag spikes from mass explosions.
Performance Controls
- Max simultaneous lights: adjustable 64–65536 (default 4096); when exceeded, higher-brightness lights are kept while lower-brightness ones are trimmed;
- Independent toggles for each light type, allowing you to disable unused effects;
- Dimension switch automatically clears light data to prevent cross-dimension lighting artifacts.
评论 0
登录后参与评分
还没有评论,来抢沙发吧