AW-DynamicLight ?
跟随玩家的发光源——不触碰你的世界。
AW-DynamicLight 是一款轻量级的 Paper 服务端动态光影插件。
手持火把、灯笼或其他配置好的光源时,游戏中的光照会跟随你移动,而无需在世界中放置真实的方块。
无需客户端模组。无需 ProtocolLib。无需修改世界数据。
✨ 特性
- ? 来自手持物品的动态光照
- ? 支持主手和副手
- ? 可配置的光照等级
- ? 感知水体的虚假光照方块
- ? 永远不会放置真实的
LIGHT 方块
- ? 不修改世界数据或区块光照
- ⚡ 专为服务器性能设计
- ? 传送、重生和世界切换时自动清理
- ? 按世界黑名单
- ?️ 热重载配置
- ? 内置性能统计
⚡ 性能
AW-DynamicLight 旨在避免传统动态光影实现中的昂贵部分。
该插件 不会创建或删除真实方块。
相反,它使用 Paper 的方块更改 API 直接向客户端发送临时的虚假 minecraft:light 方块。
这意味着:
- 无永久性方块更改
- 动态光影不会导致世界保存
- 区块中不会留下人工制造的 LIGHT 方块
- 不会触发光照系统的方块物理效应
- 不会因为放置/移除真实方块而持续重新计算区块光照
默认更新间隔为 4 ticks,当玩家的光照位置或亮度未发生变化时,插件会跳过数据包更新。
? 默认光源
| 物品 |
光照等级 |
| Torch (火把) |
14 |
| Lantern (灯笼) |
15 |
| Soul Torch (灵魂火把) |
10 |
| Soul Lantern (灵魂灯笼) |
10 |
| Campfire (营火) |
15 |
| Soul Campfire (灵魂营火) |
10 |
| Glowstone (萤石) |
15 |
| Sea Lantern (海晶灯) |
15 |
| Jack o'Lantern (南瓜灯) |
15 |
| End Rod (末地烛) |
14 |
| Redstone Torch (红石火把) |
7 |
| Magma Block (岩浆块) |
3 |
| Glow Berries (发光浆果) |
14 |
| Ochre Froglight (赭黄蛙明灯) |
15 |
| Verdant Froglight (翠绿蛙明灯) |
15 |
| Pearlescent Froglight (珠光蛙明灯) |
15 |
所有光源均可在 config.yml 中进行更改。
? 命令
/dynamiclight stats
/dynamiclight reload
/dynamiclight on
/dynamiclight off
权限:
dynamiclight.admin
⚙️ 配置
update-interval-ticks: 4
affect-offhand: true
search-nearby-blocks: true
ignored-worlds: []
items:
TORCH: 14
LANTERN: 15
SOUL_TORCH: 10
SOUL_LANTERN: 10
GLOWSTONE: 15
更新间隔
较低的值会使光照更紧密地跟随移动。
1 tick = 最大响应速度
2 ticks = 非常响应迅速
4 ticks = 推荐设置
5+ ticks = 侧重性能
? 兼容性
当前发布版本
Paper 26.2
Java 25+
计划/兼容构建
可能会为较旧的现代 Paper 发行版提供单独的构建版本,前提是这些版本拥有相同的 API 实现。
该项目有意避免使用 NMS 和包库(packet libraries),从而大大简化了兼容性维护工作。
? 需要客户端模组吗?
不需要。
玩家无需 Fabric、Forge、NeoForge、OptiFine 或任何其他客户端动态光影模组。
? 工作原理
AW-DynamicLight 利用原版的不可见 minecraft:light 方块作为 客户端虚假方块。
服务器将虚假方块发送给玩家,而无需实际更改世界。
当玩家移动时,之前的虚假方块会被还原,并在新位置发送一个新的方块。
世界本身保持不变。
⚠️ 当前限制
当前发布版本特意专注于 性能和简洁性。
目前仅计算持有光源的玩家周围的光照。
未来的共享光照模式可能允许附近的玩家看到彼此手中的光源,而无需引入昂贵的全局玩家 × 玩家扫描。
? 为什么还需要另一个动态光影插件?
AW-DynamicLight 专门致力于保持服务端实现的精简和可预测。
目标很简单:
在不让服务器的光照引擎成为瓶颈的前提下实现动态光影。
AW-DynamicLight ?
Light sources that follow players — without touching your world.
AW-DynamicLight is a lightweight server-side dynamic lighting plugin for Paper.
Hold a torch, lantern or another configured light source and the light follows you in-game without placing real blocks in the world.
No client mod required. No ProtocolLib. No world modification.
✨ Features
- ? Dynamic light from held items
- ? Main-hand and off-hand support
- ? Configurable light levels
- ? Water-aware fake light blocks
- ? Never places real
LIGHT blocks
- ? Does not modify world data or chunk lighting
- ⚡ Designed with server performance in mind
- ? Automatic cleanup on teleport, respawn and world change
- ? Per-world blacklist
- ?️ Hot configuration reload
- ? Built-in performance statistics
⚡ Performance
AW-DynamicLight is designed to avoid the expensive part of traditional dynamic-light implementations.
The plugin does not create or remove real blocks.
Instead, it sends a temporary fake minecraft:light block directly to the client using Paper's block-change API.
This means:
- no permanent block changes
- no world saves caused by dynamic lights
- no artificial LIGHT blocks left in chunks
- no block physics from the lighting system
- no continuous chunk relighting from placing/removing real blocks
The default update interval is 4 ticks, and the plugin skips packet updates when the player has not changed their light position or brightness.
? Default light sources
| Item |
Light |
| Torch |
14 |
| Lantern |
15 |
| Soul Torch |
10 |
| Soul Lantern |
10 |
| Campfire |
15 |
| Soul Campfire |
10 |
| Glowstone |
15 |
| Sea Lantern |
15 |
| Jack o'Lantern |
15 |
| End Rod |
14 |
| Redstone Torch |
7 |
| Magma Block |
3 |
| Glow Berries |
14 |
| Ochre Froglight |
15 |
| Verdant Froglight |
15 |
| Pearlescent Froglight |
15 |
Every light source can be changed in config.yml.
? Commands
/dynamiclight stats
/dynamiclight reload
/dynamiclight on
/dynamiclight off
Permission:
dynamiclight.admin
⚙️ Configuration
update-interval-ticks: 4
affect-offhand: true
search-nearby-blocks: true
ignored-worlds: []
items:
TORCH: 14
LANTERN: 15
SOUL_TORCH: 10
SOUL_LANTERN: 10
GLOWSTONE: 15
Update interval
Lower values make the light follow movement more closely.
1 tick = maximum responsiveness
2 ticks = very responsive
4 ticks = recommended
5+ ticks = performance oriented
? Compatibility
Current release
Paper 26.2
Java 25+
Planned / compatible builds
Separate builds may be provided for older modern Paper releases where the same API implementation is available.
The project intentionally avoids NMS and packet libraries where possible, making compatibility maintenance much easier.
? Client mod required?
No.
Players do not need Fabric, Forge, NeoForge, OptiFine or any other client-side dynamic-light mod.
? How it works
AW-DynamicLight uses the vanilla invisible minecraft:light block as a client-side fake block.
The server sends the fake block to the player without actually changing the world.
When the player moves, the previous fake block is restored and a new one is sent at the new position.
The world itself remains untouched.
⚠️ Current limitations
The current release is intentionally focused on performance and simplicity.
The light is currently calculated for the player carrying the source.
A future shared-light mode may allow nearby players to see each other's handheld lights without introducing an expensive global player × player scan.
? Why another dynamic-light plugin?
AW-DynamicLight is focused specifically on keeping the server-side implementation small and predictable.
The goal is simple:
Dynamic lighting without turning your server's lighting engine into the bottleneck.
评论 0
登录后参与评分
还没有评论,来抢沙发吧