PT-BR EN ES
Channel Icon

Crazy Ozz

Official Channel Website

Command Block

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

Want cheap and lag-free Minecraft hosting?

I recommend Sparked Host: affordable plans, great performance, easy panel and fast support.

πŸš€ Start your Minecraft Server

Still have questions? Watch the video below