
How to make dynamic lighting with commands in vanilla Minecraft java & berock (optifine torches)
Hello! Today I'll show you how you can make dynamic lighting in Minecraft. This tutorial is for both java and bedrock. Enjoy! Commands: Java First command: /execute at @a run fill ~10 ~-10 ~-10 ~-10 ~10 ~10 air replace light[level=14] Second command: /execute at @a[nbt={SelectedItem:{id:"minecraft:torch"}}] run fill ~ ~1 ~ ~ ~1 ~ light[level=14] replace air Third command: /execute at @a[nbt={Inventory:[{Slot:-106b,id:"minecraft:torch"}]}] if entity @a[limit=1,nbt={Inventory:[{Slot:-106b,id:"minecraft:torch"}]}] run fill ~ ~1 ~ ~ ~1 ~ light[level=14] replace air Forceload command: /forceload add ~ ~ ~ ~ Command block output command: /gamerule commandBlockOutput false Bedrock First command: /execute at @a run fill ~10 ~-10 ~-10 ~-10 ~10 ~10 air replace light_block["block_light_level"=14] Second command: /execute at @a[hasitem={item=torch,location=slot.weapon.mainhand}] run fill ~ ~1 ~ ~ ~1 ~ light_block["block_light_level"=14] Ticking area command: /tickingarea add ~ ~ ~ ~ ~ ~ Command block output command: /gamerule commandblockoutput false