How to Make a Torch Light Up in Your Hand in Minecraft (Dynamic Lighting)
Minecraft Java Edition 1.21+ and 26+ β Dynamic Lighting with Light Block and Command Blocks
In this tutorial, you will learn how to make a torch light up while holding it in your hand in Minecraft, creating a dynamic lighting effect using command blocks.
This system works in Minecraft Java Edition 1.21+ and 26+ and uses invisible light blocks to generate automatic lighting around the player.
It is perfect for adventure maps, dark caves, servers, and realistic gameplay without using mods.
First, let's get a torch with the following tag
give @p minecraft:torch[custom_data={tocha:1b}]
You can choose any tag you prefer, just donβt forget to update it in the other commands afterward
To create the torch lighting, place each of the commands below in a Repeat command block set to Always Active
execute as @a run execute at @s run fill ~2 ~-2 ~-2 ~-2 ~2 ~2 air replace light
execute as @a at @s if items entity @s weapon.mainhand torch[minecraft:custom_data={tocha:1b}] run setblock ~ ~1 ~ light[level=15]
In the last command, you can switch the main hand to the offhand (weapon.mainhand -> weapon.offhand)
You can also adjust the brightness in light[level=15] however you prefer