Skylight Light
Virtual skylight for underground farms and Dynamic Trees — without burning mobs or faking open sky.
Tag any block as a skylight source (ceiling lamps, sky blocks, custom blocks via datapack or KubeJS). The mod flood-fills an open region beneath each source and raises sky light there so plants grow as if they had daylight, while canSeeSky() stays false at default settings.
Features
- Tag-driven — no hardcoded block list; use
#skylightlanterns:skylight_source
- Dynamic Trees compatible — boosts
LightLayer.SKY (DT leaf survival needs ≥ 12)
- Vanilla crops & saplings — enough light for normal growth underground
- Safe defaults — virtual sky level 14 (grow everything;
canSeeSky needs 15)
- No undead burning — mobs do not sun-burn in skylight regions (configurable safety net)
- Performance-minded — bounded flood-fill, per-tick chunk budget, node caps; no rewriting the vanilla light engine every tick
- Server config — radius, depth, sky level, burn prevention, optional hostile spawn blocking
Requirements
|
|
| Minecraft |
1.20.1 |
| Mod loader |
Forge 47+ (tested on 47.4.13) |
| Side |
Server logic; install on client for singleplayer |
Optional (not required):
How to use
- Install the mod in your
mods folder.
- Add your lamps or sky blocks to the block tag
skylightlanterns:skylight_source.
Datapack
data/<namespace>/tags/blocks/skylight_source.json:
{
"replace": false,
"values": [
"yourmod:ceiling_lamp",
"blockofsky:sky_block"
]
}
KubeJS
ServerEvents.tags('block', event => {
event.add('skylightlanterns:skylight_source', 'kubejs:ceilling_lamp')
event.add('skylightlanterns:skylight_source', 'kubejs:ceilling_lamp2')
event.add('skylightlanterns:skylight_source', 'kubejs:ceilling_lamp_red')
event.add('skylightlanterns:skylight_source', 'blockofsky:sky_block')
})
- Place a tagged block on the ceiling of an enclosed room.
- Plant crops, saplings, or Dynamic Trees rooty dirt underneath.
- Growth should work as if the area had open sky light — without holes to the surface.
Configuration
After the first run, edit config/skylightlanterns-server.toml on the server.
| Option |
Default |
Description |
maxRadius |
12 |
Horizontal spread from each source (blocks) |
maxDepth |
24 |
Maximum depth below a source (blocks) |
nodeCap |
6000 |
Max lit blocks per source (performance limit) |
skyLevel |
14 |
Virtual sky brightness (14 = DT + crops; 15 enables canSeeSky) |
attenuateByDepth |
false |
If true, light falls off with distance from source |
preventBurning |
true |
Undead never sun-burn inside a skylight region |
blockHostileSpawns |
true |
Block monster spawns inside the region |
Tip: Keep skyLevel at 14 unless you know you need full daylight behavior.
How it works (technical)
- When a tagged block is placed or a chunk loads, the mod scans for sources and flood-fills air/passable space below them, stopping at solid blocks and config limits.
- On the server, SKY light reads are boosted inside cached regions via a mixin on the sky light engine — the same path Dynamic Trees uses in
hasAdequateLight().
- The mod does not override
canSeeSky() at default settings, so undead and weather behave normally outside the virtual light values.
Testing
- Build a sealed underground room (solid roof, no sky access).
- Place a tagged ceiling lamp or sky block.
- Plant a Dynamic Trees sapling or crops below.
- Leaves should stay green and the tree should grow; crops should mature.
Spawn a zombie under the lamp in daytime — it should not burn (with default config).
Credits
Concept inspired by the older Skylight Lanterns project. This is an independent reimplementation for Minecraft 1.20.1 / Forge, not a port of that jar.
License
MIT — see LICENSE in the release package.