aboutsummaryrefslogblamecommitdiff
path: root/data/bktsb/functions/structgen/helpers/amethyst/generate.mcfunction
blob: 19719a4e44fe77ce4f3231943c42073c195b5c5f (plain) (tree)



















                                                                                                                                                                  
scoreboard players set #a genvar 0
execute if block ~ ~-1 ~ diamond_block run scoreboard players set #a genvar 1

fill ~-11 ~-12 ~-11 ~11 ~11 ~11 air
kill @e[type=item,distance=..20,nbt={Item:{id:"minecraft:redstone"}}]
fill ~-11 ~-11 ~-11 ~11 ~11 ~11 redstone_wire
execute as @e[type=item,distance=..10,nbt={Item:{id:"minecraft:redstone"}}] at @s run setblock ~ ~ ~ smooth_basalt
execute as @e[type=item,distance=..9,nbt={Item:{id:"minecraft:redstone"}}] at @s run setblock ~ ~ ~ calcite
execute as @e[type=item,distance=..8,nbt={Item:{id:"minecraft:redstone"}}] at @s run setblock ~ ~ ~ amethyst_block
execute as @e[type=item,distance=..7,nbt={Item:{id:"minecraft:redstone"}}] at @s run setblock ~ ~ ~ air
kill @e[type=item,distance=..20,nbt={Item:{id:"minecraft:redstone"}}]

scoreboard players set #a lim 24
function bktsb:rng
scoreboard players operation #a looper = #a randr
scoreboard players set #a lim 16
scoreboard players operation #a looper += #a lim
scoreboard players set #a loopstep 1

execute if score #a genvar matches 1.. run setblock ~ ~-1 ~ repeating_command_block{auto:1,Command:"function bktsb:structgen/helpers/amethyst/loop",TrackOutput:0}