aboutsummaryrefslogblamecommitdiff
path: root/data/bktsb/functions/structgen/helpers/gen_bastion_helper.mcfunction
blob: acdb77e33d1212e5bcd1b256687fd27530d81a1c (plain) (tree)




























                                                                                                                                                                                                                             
fill ~ ~ ~ ~ ~-12 ~ minecraft:air replace minecraft:redstone_block
setblock ~ ~ ~ minecraft:air
fill ~-16 ~-10 ~-16 ~16 ~-9 ~16 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/place_bastion_common_loot_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"bastion_other"}
fill ~-20 ~-9 ~-20 ~20 ~-7 ~20 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/place_bastion_treasure_loot_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"bastion_treasure"}

scoreboard players set #a lim 3
function bktsb:rng

execute if score #a randr matches 1.. run summon piglin_brute ~ ~ ~
scoreboard players remove #a randr 1
execute if score #a randr matches 1.. run summon piglin_brute ~ ~ ~

execute as @e[type=piglin_brute,distance=..50] run data merge entity @s {IsImmuneToZombification:1}

scoreboard players set #a lim 5
function bktsb:rng

execute if score #a randr matches 1.. run summon piglin ~ ~ ~
scoreboard players remove #a randr 1
execute if score #a randr matches 1.. run summon piglin ~ ~ ~
scoreboard players remove #a randr 1
execute if score #a randr matches 1.. run summon piglin ~ ~ ~
scoreboard players remove #a randr 1
execute if score #a randr matches 1.. run summon piglin ~ ~ ~

execute as @e[type=piglin,distance=..50] run data merge entity @s {IsImmuneToZombification:1}

spreadplayers ~ ~ 2 20 false @e[type=piglin_brute,distance=..50]
spreadplayers ~ ~ 2 20 false @e[type=piglin,distance=..50]