一个基于实体的动态光照插件,支持与其他插件集成。
手持物品、掉落物、燃烧的生物以及其他实体都会发光。完全可配置,其他插件可以通过 API 或记分板标签定义自己的自定义发光实体。
功能
光源
- 手持物品 - 火把、灯笼、萤石以及 40+ 种其他物品在手持时会发出光线
- 掉落物品 - 地面上的物品会发出其对应的光照等级
- 燃烧实体 - 任何着火的实体都会以可配置的强度发光
- 火焰弹射物 - 燃烧的箭矢、火球和灵魂之箭会发出光线
- 附魔装备 - 穿着附魔盔甲或手持附魔物品的玩家会发出微弱的光芒
- 常亮实体 - 烈焰人、发光鱿鱼、岩浆怪和悦灵始终发出光线
- 记分板标签光源 - 拥有
dynlight:<level> 记分板标签的任何实体都会发出光线,从而实现跨插件集成,无需编译时依赖
特殊机制
- 水敏感性 - 基于火的物品(火把、营火)在水下会被熄灭,而防水物品(萤石、海晶灯)继续发光
- 仅客户端渲染 - 光块基于数据包传输,不会修改世界。灵感来源于 DynamicLights
- 按玩家切换 - 玩家可以单独在客户端启用/禁用动态光照
- 异步渲染 - 光照计算在异步线程运行,对服务器影响最小
配置
性能设置:
# 更新间隔(单位:刻,20 刻 = 1 秒)
# 数值越小 = 更新越频繁 = 光照移动更平滑,但 CPU 占用更高
update-interval: 1
# 渲染动态光照的最大距离(单位:格)
render-distance: 96
# 检查实体火焰熄灭的频率(单位:刻,10 = 0.5 秒)
fire-sweep-interval: 10
启用或禁用特定的光源类型:
detection:
held-items: true
dropped-items: true
burning-entities: true
flaming-arrows: true
enchanted-armor: true
enchanted-items: true
always-lit-entities: true
tagged-entities: true
配置附魔装备的光照强度:
light-levels:
enchanted-armor: 3
enchanted-items: 3
配置物品如何发出光线:
items:
TORCH:
light: 10
water-sensitive: true
LANTERN:
light: 12
water-sensitive: false
具有水敏感性的物品在被淹没时将停止发光。
配置实体着火时如何发出光线:
entities:
# 属性:基础光照、火焰光照、水平半径、高度
BLAZE:
base-light: 8 # 始终发出光线
fire-light: 15
| 属性 |
描述 |
默认值 |
base-light |
未着火时的光照等级(0 = 仅在燃烧时发光) |
0 |
fire-light |
着火时的光照等级 |
12 |
horizontal-radius |
光柱半径(0=1x1,1=3x3,2=5x5) |
1 |
height |
光柱高度(单位:格) |
2 |
光柱将放置一个光块——我们会比看起来更宽地搜索以避免障碍物,因为光块不能放置在藤蔓、高草、梯子等物体内部。
命令
| 命令 |
描述 |
权限 |
/dynlight help |
显示可用命令 |
- |
/dynlight enable |
为你自己启用动态光照 |
dynlight.use |
/dynlight disable |
为你自己禁用动态光照 |
dynlight.use |
/dynlight info |
显示活动光源数量 |
dynlight.admin |
/dynlight stats |
显示详细统计信息 |
dynlight.admin |
/dynlight reload |
重新加载配置 |
dynlight.admin |
/dynlight regen |
重新生成所有光源 |
dynlight.admin |
记分板标签光源
任何拥有匹配 dynlight:<level> 记分板标签的实体都会发出光线。无需 API 依赖——只需通过命令或其他插件添加标签即可。
格式: dynlight:<level> 或 dynlight:<level>:<radius>:<height>
| 参数 |
范围 |
描述 |
level |
1–15 |
光照等级 |
radius |
0–5 |
水平搜索半径(可选,默认来自实体配置) |
height |
1–10 |
垂直搜索高度(可选,默认来自实体配置) |
示例:
/summon armor_stand ~ ~ ~ {Tags:["dynlight:15"]}
/summon armor_stand ~ ~ ~ {Tags:["dynlight:10:3:5"]}
注意:/tag 命令不支持标签名中的冒号——在召唤时使用 NBT Tags,或通过其他插件以编程方式添加标签。
A dynamic entity-based lighting plugin, which allows for integrations with other plugins.
Held items, dropped items, burning mobs, and other entities glow. Fully configurable, and other plugins can use the API or scoreboard tags to define their own custom glowing entities.
Features
Light Sources
- Held Items - Torches, lanterns, glowstone, and 40+ other items emit light when held
- Dropped Items - Items on the ground emit their light level
- Burning Entities - Any entity on fire glows with configurable intensity
- Flaming Projectiles - Arrows on fire, fireballs, and spectral arrows emit light
- Enchanted Equipment - Players wearing enchanted armor or holding enchanted items emit a subtle glow
- Always-Lit Entities - Blazes, Glow Squids, Magma Cubes, and Allays always emit light
- Scoreboard Tag Lights - Any entity with a
dynlight:<level> scoreboard tag emits light, enabling cross-plugin integration without compile-time dependencies
Special Mechanics
- Water Sensitivity - Fire-based items (torches, campfires) are extinguished underwater while waterproof items (glowstone, sea lanterns) continue to glow
- Client-side only - Light blocks are packet based, and don't modify the world. Inspired by DynamicLights
- Per-Player Toggle - Players can individually enable/disable dynamic lights client side
- Async Rendering - Light calculations run asynchronously for minimal server impact
Configuration
Performance settings:
# Update interval in ticks (20 ticks = 1 second)
# smaller values = more frequent updates = smoother light movement but higher CPU usage
update-interval: 1
# Maximum distance to render dynamic lights (blocks)
render-distance: 96
# How often to check for fire expiration on entities (ticks, 10 = 0.5 seconds)
fire-sweep-interval: 10
Enable or disable specific light source types:
detection:
held-items: true
dropped-items: true
burning-entities: true
flaming-arrows: true
enchanted-armor: true
enchanted-items: true
always-lit-entities: true
tagged-entities: true
Configure light intensity for enchanted equipment:
light-levels:
enchanted-armor: 3
enchanted-items: 3
Configure how items emit light:
items:
TORCH:
light: 10
water-sensitive: true
LANTERN:
light: 12
water-sensitive: false
Water-sensitive items stop emitting light when submerged.
Configure how entities emit light when on fire:
entities:
# Properties: base-light, fire-light, horizontal-radius, height
BLAZE:
base-light: 8 # Always emits light
fire-light: 15
| Property |
Description |
Default |
base-light |
Light level when not on fire (0 = only when burning) |
0 |
fire-light |
Light level when on fire |
12 |
horizontal-radius |
Light column radius (0=1x1, 1=3x3, 2=5x5) |
1 |
height |
Light column height in blocks |
2 |
The light column will once place one light block -- we search wider than you'd think to avoid obstacles, since light blocks can't be placed inside things like vines, tall grass, ladders, etc.
Commands
| Command |
Description |
Permission |
/dynlight help |
Show available commands |
- |
/dynlight enable |
Enable dynamic lights for yourself |
dynlight.use |
/dynlight disable |
Disable dynamic lights for yourself |
dynlight.use |
/dynlight info |
Show active light source count |
dynlight.admin |
/dynlight stats |
Show detailed statistics |
dynlight.admin |
/dynlight reload |
Reload configuration |
dynlight.admin |
/dynlight regen |
Regenerate all light sources |
dynlight.admin |
Scoreboard Tag Lights
Any entity with a scoreboard tag matching dynlight:<level> will emit light. No API dependency required — just add the tag via commands or another plugin.
Format: dynlight:<level> or dynlight:<level>:<radius>:<height>
| Parameter |
Range |
Description |
level |
1–15 |
Light level |
radius |
0–5 |
Horizontal search radius (optional, default from entity config) |
height |
1–10 |
Vertical search height (optional, default from entity config) |
Examples:
/summon armor_stand ~ ~ ~ {Tags:["dynlight:15"]}
/summon armor_stand ~ ~ ~ {Tags:["dynlight:10:3:5"]}
Note: the /tag command does not support colons in tag names — use NBT Tags when summoning, or add tags programmatically from another plugin.
评论 0
登录后参与评分
还没有评论,来抢沙发吧