Dynamic Torch Lighting

Dynamic Torch Lighting

944 Downloads

This simple datapack makes held (soul) torches light up your environment. It is similar to Optifine's dynamic lighting. Simply hold a torch or soul torch, or put it in your off-hand, and light will shine!

NOTE: To configure how bright the torch's light is, type /function lightlevel into the chat and click the 15 options to change the brightness.

How does it work?

The datapack constantly (every tick, so 20 times per second) checks if you're holding a (soul) torch. If you are, it places Light blocks at your position. It also removes previously placed ones. This way, even if you fly around at fast speeds, the light will be able to keep up. To achieve different levels of light, we simply place a Light block with a different NBT level (1-15). The default value is 13.