A first-person flashlight for the IRLights lighting engine
Hold the item and a real spotlight — with shadows, volumetrics and a projected reflector pattern — follows your gaze. An add-on: it plugs into whichever IRLights host you already run, IRLights or IRL-editor.
A small client-side Fabric mod that adds one item: a flashlight. Hold it in either hand and it registers a spotlight into the shared irl-core light registry every frame — from your eyes, along your view direction.
Because it feeds the same registry the host mods use, the beam is a real light: it casts shadows,
scatters volumetrically, and projects a gobo/cookie mask that reads as a reflector pattern. Right-click
to switch it on and off; press G for a settings screen with live sliders.
The mod hooks renderWorld at a mixin priority below the host's collector, so the spot lands in the
very same frame's shadow bake and SSBO upload — no one-frame lag behind the world.
| Feature | Details |
|---|---|
| Eye-mounted spotlight | Emitted from the interpolated eye position along your look vector |
| Smoothing | Frame-rate-independent easing of the beam direction — the light has weight |
| Shadows | Rides the host's per-frame spot shadow bake |
| Volumetrics | Beam strength slider for the visible light shaft |
| Cookie / gobo | Projected reflector mask, with a scale slider |
| Settings screen | G — intensity, reach, cone angles, RGB, beam, smoothing, shadows, cookie |
| Right-click toggle | Per-stack on/off state, authoritative on the server, with a click sound |
| Dual-host | Works under IRLights (BBS add-on) or IRL-editor — whichever is installed |
| No engine copy | Depends on irl-core but never bundles it: the host already ships it |
Fabric Loader · Fabric API · Iris · an IRLights host · a patched shaderpack.
The flashlight is an add-on, not a standalone light source. It needs:
- A host mod — either IRLights (the BBS Mod Studio
add-on) or IRL-editor. The host owns the frame pipeline and
ships
irl-coreinside its own jar. - Iris + a patched shaderpack — apply the host's
.irlightspatch to a supported pack. Without shaders the engine is dormant and no IRLights light is visible, flashlight included.
One line per era; each jar covers the whole range in its row.
| Jar | Minecraft | Notes |
|---|---|---|
irlights-flashlight-1.0.0+mc1.20.1.jar |
1.20.1 – 1.20.4 | built against 1.20.1 |
irlights-flashlight-1.0.0+mc1.20.4.jar |
1.20.1 – 1.20.4 | built against 1.20.4 |
irlights-flashlight-1.0.0+mc1.21.1.jar |
1.21 – 1.21.1 | |
irlights-flashlight-1.0.0+mc1.21.11.jar |
1.21.11 | |
irlights-flashlight-1.0.0+mc1.20.1-1.21.1.jar |
1.20.1 – 1.20.4 + 1.21 – 1.21.1 | universal build — see below |
Match the host: run the flashlight jar for the same Minecraft version as your IRLights host.
- Install Fabric Loader, Fabric API and Iris.
- Install an IRLights host — IRLights (BBS add-on) or IRL-editor.
- Drop the flashlight jar for your Minecraft version into
mods/. - Patch your shaderpack from the host's patcher, enable it in Iris, reload shaders (
F3 + R). - Grab the Flashlight from the Tools & Utilities creative tab.
| Input | Action |
|---|---|
| Right-click | Toggle the beam on / off (state lives on the item) |
G |
Open the settings screen |
Sliders write the live config as you drag, so the beam updates on the next frame; everything is saved
to config/irlights-flashlight.json when the screen closes.
+mc1.20.1-1.21.1 is one jar for the 1.20.x and 1.21.0/1.21.1 eras. Minecraft 1.20.5 replaced item NBT
with data components and rewrote the networking API, and 1.21 changed GameRenderer.renderWorld's
signature — so the jar is compiled against the newest target it covers and reaches the older era
reflectively, from classes that are never loaded on the version they don't belong to. Two renderWorld
mixins ship side by side and an IMixinConfigPlugin installs exactly one, chosen from the running
version.
It does not cover 1.21.11 — use the dedicated +mc1.21.11 jar there.
It is the same code and the same features as the per-MC jars — just a single file. Prefer the per-MC jar if you want the well-trodden path; the universal jar is the convenient one. On startup it logs which hook it installed:
Flashlight universal build: 1.21+ renderWorld hook
The universal jar is not meant for a named (dev) runtime — its 1.20.x half targets intermediary names. Use the per-MC jar when running from source.
The mod consumes irl-core as a per-version Maven dependency, so publish the matching core to mavenLocal first — its branch has to match the Minecraft version you build.
# 1) publish the matching core (from the irl-core repo, on the right branch)
../irl-core/gradlew publishToMavenLocal
# 2) build one target
./gradlew build -Pmc=1.20.1 # or 1.20.4 | 1.21.1 | 1.21.11 | universal-Pmc picks the Minecraft/yarn/Fabric API coordinates and the source root that gets folded into
main:
| Source root | Era | Holds |
|---|---|---|
src/main/java |
shared | everything that compiles unchanged on every target |
src/mc1200/java |
1.20.1 – 1.20.4 | item NBT, raw-channel networking, renderWorld(F, J, MatrixStack) |
src/mc1210/java |
1.21 – 1.21.1 | data components, CustomPayload, renderWorld(RenderTickCounter) |
src/mc1211/java |
1.21.11 | + getTickProgress, ActionResult, KeyBinding.Category, mandatory Item.Settings.registryKey |
src/universal/java |
1.20.1 – 1.21.1 | runtime era detection, reflective legacy paths, mixin plugin |
Each era root holds the same six fully-qualified class names — per-stack state, the two networking
halves, item registration, client input and the renderWorld mixin — so the shared code never branches
on a version.
| Repo | Role |
|---|---|
| irl-flashlight (this repo) | Flashlight add-on |
| bbs-irlights-addon | IRLights — BBS Mod Studio add-on (host) |
| irl-editor | Standalone ImGui light editor (host) |
| irl-core | Shared engine: light SSBO + .irlights patcher |
Released under the MIT License — © 2026 qualet.