Sulfur Cube Dynamic Light

Make your sulfur cube with glowing blocks inside glow!

Supported Versions:

26.1.2-26.2+

Commands by Row:

Row 1

1. [repeat] /execute as @e[type=minecraft:sulfur_cube,nbt={equipment:{body:{count:1,id:"minecraft:glowstone"}}}] at @s run tag @s add glowingSulfur
2. [chain] /execute as @e[type=minecraft:sulfur_cube,nbt={equipment:{body:{count:1,id:"minecraft:shroomlight"}}}] at @s run tag @s add glowingSulfur
3. [chain] /execute as @e[type=minecraft:sulfur_cube,nbt=!{equipment:{body:{count:1,id:"minecraft:shroomlight"}}},nbt=!{equipment:{body:{count:1,id:"minecraft:glowstone"}}}] at @s run tag @s remove glowingSulfur

Row 2

4. [repeat] /execute as @e[tag=glowingSulfur] at @s unless entity @e[tag=sulfurGlowingStand,distance=..1] run summon minecraft:armor_stand ~ ~ ~ {Tags:["sulfurGlowingStand"],NoGravity:1,Marker:1,Invisible:1}
5. [chain] /execute as @e[tag=sulfurGlowingStand] at @s if block ~ ~ ~ #minecraft:air run setblock ~ ~ ~ minecraft:light
6. [chain] /execute as @e[tag=sulfurGlowingStand] at @s unless entity @e[tag=glowingSulfur,distance=..1] run fill ~ ~ ~ ~ ~ ~ air replace light
7. [chain] /execute as @e[tag=sulfurGlowingStand] at @s unless entity @e[tag=glowingSulfur,distance=..1] run kill @s

Preview

repeat
chain
chain
repeat
chain
chain
chain

Video

Too lazy to copy and paste each command?