execute if block ~ ~ ~ minecraft:lapis_block run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:lapis_block",Count:1b,tag:{CanPlaceOn:["minecraft:gold_block","minecraft:lapis_block","minecraft:redstone_block","minecraft:purpur_block"],display:{Name:"Structure Cube"}}}}
execute if block ~ ~ ~ minecraft:redstone_block run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:redstone_block",Count:1b,tag:{CanPlaceOn:["minecraft:observer","minecraft:gold_block","minecraft:lapis_block","minecraft:redstone_block","minecraft:purpur_block"],display:{Name:"Power Cube"}}}}
execute if block ~ ~ ~ minecraft:purpur_block run summon minecraft:item ~ ~ ~ {Item:{id:"minecraft:purpur_block",Count:1b,tag:{CanPlaceOn:["minecraft:gold_block","minecraft:lapis_block","minecraft:redstone_block","minecraft:purpur_block"],display:{Name:"Gravity Cube"}}}}
#might want to add can place on checks here
setblock ~ ~ ~ minecraft:air
execute positioned ~1 ~ ~ run function q:clearcheck
execute positioned ~ ~1 ~ run function q:clearcheck
execute positioned ~ ~ ~1 run function q:clearcheck
execute positioned ~-1 ~ ~ run function q:clearcheck
execute positioned ~ ~-1 ~ run function q:clearcheck
execute positioned ~ ~ ~-1 run function q:clearcheck