diff options
author | Chris Xiong <chirs241097@gmail.com> | 2021-07-24 16:59:58 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2021-07-24 16:59:58 +0800 |
commit | 77f0e689f84a601f5da4aaf2308bccf74a531346 (patch) | |
tree | 8154832f6c4ac0d071a771657c4a67c6a024f398 /data/bktsb/functions/structgen | |
download | bktmc-skyblock-77f0e689f84a601f5da4aaf2308bccf74a531346.tar.xz |
Initial public release (minecraft 1.17.1).
Diffstat (limited to 'data/bktsb/functions/structgen')
36 files changed, 277 insertions, 0 deletions
diff --git a/data/bktsb/functions/structgen/gen_amethyst.mcfunction b/data/bktsb/functions/structgen/gen_amethyst.mcfunction new file mode 100644 index 0000000..f733f22 --- /dev/null +++ b/data/bktsb/functions/structgen/gen_amethyst.mcfunction @@ -0,0 +1 @@ +function bktsb:structgen/helpers/amethyst/generate diff --git a/data/bktsb/functions/structgen/gen_bastion_east.mcfunction b/data/bktsb/functions/structgen/gen_bastion_east.mcfunction new file mode 100644 index 0000000..b4266b2 --- /dev/null +++ b/data/bktsb/functions/structgen/gen_bastion_east.mcfunction @@ -0,0 +1,25 @@ +scoreboard players set #a lim 4 +function bktsb:rng +scoreboard players operation #a genvar = #a randr +#for debugging +#scoreboard players set #a genvar 0 + +#11 x 4 x 12, w x h x d +execute if score #a genvar matches 0 run setblock ~13 ~ ~-5 minecraft:structure_block{name:"bktsb:nether/bastion1",mode:"LOAD",ignoreEntities:1,rotation:"CLOCKWISE_90"} replace +execute if score #a genvar matches 0 run setblock ~13 ~12 ~-5 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 0 run setblock ~13 ~1 ~-5 redstone_block + +#10 x 3 x 10 +execute if score #a genvar matches 1 run setblock ~11 ~ ~-5 minecraft:structure_block{name:"bktsb:nether/bastion2",mode:"LOAD",ignoreEntities:1,rotation:"CLOCKWISE_90"} replace +execute if score #a genvar matches 1 run setblock ~11 ~12 ~-5 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 1 run setblock ~11 ~1 ~-5 redstone_block + +#11 x 5 x 11 +execute if score #a genvar matches 2 run setblock ~12 ~ ~-5 minecraft:structure_block{name:"bktsb:nether/bastion3",mode:"LOAD",ignoreEntities:1,rotation:"CLOCKWISE_90"} replace +execute if score #a genvar matches 2 run setblock ~12 ~12 ~-5 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 2 run setblock ~12 ~1 ~-5 redstone_block + +#19 x 10 x 20 +execute if score #a genvar matches 3 run setblock ~21 ~ ~-9 minecraft:structure_block{name:"bktsb:nether/bastion4",mode:"LOAD",ignoreEntities:1,rotation:"CLOCKWISE_90"} replace +execute if score #a genvar matches 3 run setblock ~21 ~12 ~-9 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 3 run setblock ~21 ~1 ~-9 redstone_block diff --git a/data/bktsb/functions/structgen/gen_bastion_north.mcfunction b/data/bktsb/functions/structgen/gen_bastion_north.mcfunction new file mode 100644 index 0000000..492ef0c --- /dev/null +++ b/data/bktsb/functions/structgen/gen_bastion_north.mcfunction @@ -0,0 +1,25 @@ +scoreboard players set #a lim 4 +function bktsb:rng +scoreboard players operation #a genvar = #a randr +#for debugging +#scoreboard players set #a genvar 0 + +#11 x 4 x 12, w x h x d +execute if score #a genvar matches 0 run setblock ~-5 ~ ~-13 minecraft:structure_block{name:"bktsb:nether/bastion1",mode:"LOAD",ignoreEntities:1,rotation:"NONE"} replace +execute if score #a genvar matches 0 run setblock ~-5 ~12 ~-13 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 0 run setblock ~-5 ~1 ~-13 redstone_block + +#10 x 3 x 10 +execute if score #a genvar matches 1 run setblock ~-5 ~ ~-11 minecraft:structure_block{name:"bktsb:nether/bastion2",mode:"LOAD",ignoreEntities:1,rotation:"NONE"} replace +execute if score #a genvar matches 1 run setblock ~-5 ~12 ~-11 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 1 run setblock ~-5 ~1 ~-11 redstone_block + +#11 x 5 x 11 +execute if score #a genvar matches 2 run setblock ~-5 ~ ~-12 minecraft:structure_block{name:"bktsb:nether/bastion3",mode:"LOAD",ignoreEntities:1,rotation:"NONE"} replace +execute if score #a genvar matches 2 run setblock ~-5 ~12 ~-12 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 2 run setblock ~-5 ~1 ~-12 redstone_block + +#19 x 10 x 20 +execute if score #a genvar matches 3 run setblock ~-9 ~ ~-21 minecraft:structure_block{name:"bktsb:nether/bastion4",mode:"LOAD",ignoreEntities:1,rotation:"NONE"} replace +execute if score #a genvar matches 3 run setblock ~-9 ~12 ~-21 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 3 run setblock ~-9 ~1 ~-21 redstone_block diff --git a/data/bktsb/functions/structgen/gen_bastion_south.mcfunction b/data/bktsb/functions/structgen/gen_bastion_south.mcfunction new file mode 100644 index 0000000..d031e21 --- /dev/null +++ b/data/bktsb/functions/structgen/gen_bastion_south.mcfunction @@ -0,0 +1,25 @@ +scoreboard players set #a lim 4 +function bktsb:rng +scoreboard players operation #a genvar = #a randr +#for debugging +#scoreboard players set #a genvar 0 + +#11 x 4 x 12, w x h x d +execute if score #a genvar matches 0 run setblock ~5 ~ ~13 minecraft:structure_block{name:"bktsb:nether/bastion1",mode:"LOAD",ignoreEntities:1,rotation:"CLOCKWISE_180"} replace +execute if score #a genvar matches 0 run setblock ~5 ~12 ~ minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 0 run setblock ~5 ~1 ~13 redstone_block + +#10 x 3 x 10 +execute if score #a genvar matches 1 run setblock ~5 ~ ~11 minecraft:structure_block{name:"bktsb:nether/bastion2",mode:"LOAD",ignoreEntities:1,rotation:"CLOCKWISE_180"} replace +execute if score #a genvar matches 1 run setblock ~5 ~12 ~ minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 1 run setblock ~5 ~1 ~11 redstone_block + +#11 x 5 x 11 +execute if score #a genvar matches 2 run setblock ~5 ~ ~12 minecraft:structure_block{name:"bktsb:nether/bastion3",mode:"LOAD",ignoreEntities:1,rotation:"CLOCKWISE_180"} replace +execute if score #a genvar matches 2 run setblock ~5 ~12 ~ minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 2 run setblock ~5 ~1 ~12 redstone_block + +#19 x 10 x 20 +execute if score #a genvar matches 3 run setblock ~9 ~ ~21 minecraft:structure_block{name:"bktsb:nether/bastion4",mode:"LOAD",ignoreEntities:1,rotation:"CLOCKWISE_180"} replace +execute if score #a genvar matches 3 run setblock ~9 ~12 ~ minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 3 run setblock ~9 ~1 ~21 redstone_block diff --git a/data/bktsb/functions/structgen/gen_bastion_west.mcfunction b/data/bktsb/functions/structgen/gen_bastion_west.mcfunction new file mode 100644 index 0000000..4ff206f --- /dev/null +++ b/data/bktsb/functions/structgen/gen_bastion_west.mcfunction @@ -0,0 +1,25 @@ +scoreboard players set #a lim 4 +function bktsb:rng +scoreboard players operation #a genvar = #a randr +#for debugging +#scoreboard players set #a genvar 0 + +#11 x 4 x 12, w x h x d +execute if score #a genvar matches 0 run setblock ~-13 ~ ~5 minecraft:structure_block{name:"bktsb:nether/bastion1",mode:"LOAD",ignoreEntities:1,rotation:"COUNTERCLOCKWISE_90"} replace +execute if score #a genvar matches 0 run setblock ~-13 ~12 ~5 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 0 run setblock ~-13 ~1 ~5 redstone_block + +#10 x 3 x 10 +execute if score #a genvar matches 1 run setblock ~-11 ~ ~5 minecraft:structure_block{name:"bktsb:nether/bastion2",mode:"LOAD",ignoreEntities:1,rotation:"COUNTERCLOCKWISE_90"} replace +execute if score #a genvar matches 1 run setblock ~-11 ~12 ~5 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 1 run setblock ~-11 ~1 ~5 redstone_block + +#11 x 5 x 11 +execute if score #a genvar matches 2 run setblock ~-12 ~ ~5 minecraft:structure_block{name:"bktsb:nether/bastion3",mode:"LOAD",ignoreEntities:1,rotation:"COUNTERCLOCKWISE_90"} replace +execute if score #a genvar matches 2 run setblock ~-12 ~12 ~5 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 2 run setblock ~-12 ~1 ~5 redstone_block + +#19 x 10 x 20 +execute if score #a genvar matches 3 run setblock ~-21 ~ ~9 minecraft:structure_block{name:"bktsb:nether/bastion4",mode:"LOAD",ignoreEntities:1,rotation:"COUNTERCLOCKWISE_90"} replace +execute if score #a genvar matches 3 run setblock ~-21 ~12 ~9 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_bastion_helper",TrackOutput:0} +execute if score #a genvar matches 3 run setblock ~-21 ~1 ~9 redstone_block diff --git a/data/bktsb/functions/structgen/gen_dungeon.mcfunction b/data/bktsb/functions/structgen/gen_dungeon.mcfunction new file mode 100644 index 0000000..50ef606 --- /dev/null +++ b/data/bktsb/functions/structgen/gen_dungeon.mcfunction @@ -0,0 +1,3 @@ +function bktsb:structgen/helpers/dungeon/room +execute positioned ~ ~-1 ~ if block ~ ~ ~ gold_block run function bktsb:structgen/helpers/dungeon/spawner +function bktsb:structgen/helpers/dungeon/loot diff --git a/data/bktsb/functions/structgen/gen_endship_east.mcfunction b/data/bktsb/functions/structgen/gen_endship_east.mcfunction new file mode 100644 index 0000000..0547a36 --- /dev/null +++ b/data/bktsb/functions/structgen/gen_endship_east.mcfunction @@ -0,0 +1,4 @@ +#13 x 24 x 29, w x h x d +setblock ~30 ~ ~-6 minecraft:structure_block{name:"end_city/ship",mode:"LOAD",ignoreEntities:0,rotation:"CLOCKWISE_90"} replace +setblock ~30 ~30 ~-6 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_end_ship_east_helper",TrackOutput:0} +setblock ~30 ~1 ~-6 redstone_block diff --git a/data/bktsb/functions/structgen/gen_endship_north.mcfunction b/data/bktsb/functions/structgen/gen_endship_north.mcfunction new file mode 100644 index 0000000..7cde7f2 --- /dev/null +++ b/data/bktsb/functions/structgen/gen_endship_north.mcfunction @@ -0,0 +1,4 @@ +#13 x 24 x 29, w x h x d +setblock ~-6 ~ ~-30 minecraft:structure_block{name:"end_city/ship",mode:"LOAD",ignoreEntities:0,rotation:"NONE"} replace +setblock ~-6 ~30 ~-30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_end_ship_north_helper",TrackOutput:0} +setblock ~-6 ~1 ~-30 redstone_block diff --git a/data/bktsb/functions/structgen/gen_endship_south.mcfunction b/data/bktsb/functions/structgen/gen_endship_south.mcfunction new file mode 100644 index 0000000..0499ac2 --- /dev/null +++ b/data/bktsb/functions/structgen/gen_endship_south.mcfunction @@ -0,0 +1,4 @@ +#13 x 24 x 29, w x h x d +setblock ~6 ~ ~30 minecraft:structure_block{name:"end_city/ship",mode:"LOAD",ignoreEntities:0,rotation:"CLOCKWISE_180"} replace +setblock ~6 ~30 ~ minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_end_ship_south_helper",TrackOutput:0} +setblock ~6 ~1 ~30 redstone_block diff --git a/data/bktsb/functions/structgen/gen_endship_west.mcfunction b/data/bktsb/functions/structgen/gen_endship_west.mcfunction new file mode 100644 index 0000000..b83d94c --- /dev/null +++ b/data/bktsb/functions/structgen/gen_endship_west.mcfunction @@ -0,0 +1,4 @@ +#13 x 24 x 29, w x h x d +setblock ~-30 ~ ~6 minecraft:structure_block{name:"end_city/ship",mode:"LOAD",ignoreEntities:0,rotation:"COUNTERCLOCKWISE_90"} replace +setblock ~-30 ~30 ~6 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_end_ship_west_helper",TrackOutput:0} +setblock ~-30 ~1 ~6 redstone_block diff --git a/data/bktsb/functions/structgen/gen_fortressbalcony_east.mcfunction b/data/bktsb/functions/structgen/gen_fortressbalcony_east.mcfunction new file mode 100644 index 0000000..489efee --- /dev/null +++ b/data/bktsb/functions/structgen/gen_fortressbalcony_east.mcfunction @@ -0,0 +1,4 @@ +# 7 x 5 x 7 +setblock ~8 ~ ~3 minecraft:structure_block{name:"bktsb:nether/fortress",mode:"LOAD",ignoreEntities:1,rotation:"CLOCKWISE_180"} replace +setblock ~8 ~12 ~3 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_generic_helper",TrackOutput:0} +setblock ~8 ~1 ~3 redstone_block diff --git a/data/bktsb/functions/structgen/gen_fortressbalcony_north.mcfunction b/data/bktsb/functions/structgen/gen_fortressbalcony_north.mcfunction new file mode 100644 index 0000000..f9c3028 --- /dev/null +++ b/data/bktsb/functions/structgen/gen_fortressbalcony_north.mcfunction @@ -0,0 +1,4 @@ +# 7 x 5 x 7 +setblock ~3 ~ ~-8 minecraft:structure_block{name:"bktsb:nether/fortress",mode:"LOAD",ignoreEntities:1,rotation:"CLOCKWISE_90"} replace +setblock ~3 ~12 ~ minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_generic_helper",TrackOutput:0} +setblock ~3 ~1 ~-8 redstone_block diff --git a/data/bktsb/functions/structgen/gen_fortressbalcony_south.mcfunction b/data/bktsb/functions/structgen/gen_fortressbalcony_south.mcfunction new file mode 100644 index 0000000..9418e6f --- /dev/null +++ b/data/bktsb/functions/structgen/gen_fortressbalcony_south.mcfunction @@ -0,0 +1,4 @@ +# 7 x 5 x 7 +setblock ~-3 ~ ~8 minecraft:structure_block{name:"bktsb:nether/fortress",mode:"LOAD",ignoreEntities:1,rotation:"COUNTERCLOCKWISE_90"} replace +setblock ~-3 ~12 ~ minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_generic_helper",TrackOutput:0} +setblock ~-3 ~1 ~8 redstone_block diff --git a/data/bktsb/functions/structgen/gen_fortressbalcony_west.mcfunction b/data/bktsb/functions/structgen/gen_fortressbalcony_west.mcfunction new file mode 100644 index 0000000..e5b791d --- /dev/null +++ b/data/bktsb/functions/structgen/gen_fortressbalcony_west.mcfunction @@ -0,0 +1,4 @@ +# 7 x 5 x 7 +setblock ~-8 ~ ~-3 minecraft:structure_block{name:"bktsb:nether/fortress",mode:"LOAD",ignoreEntities:1,rotation:"NONE"} replace +setblock ~-8 ~12 ~-3 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/gen_generic_helper",TrackOutput:0} +setblock ~-8 ~1 ~-3 redstone_block diff --git a/data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction b/data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction new file mode 100644 index 0000000..74ec2b3 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/amethyst/cast_ray.mcfunction @@ -0,0 +1,13 @@ +summon armor_stand ~ ~ ~ {Glowing:1,NoGravity:1} + +scoreboard players set #a lim 360 +function bktsb:rng +execute store result entity @e[type=armor_stand,sort=nearest,nbt={Glowing:1b},tag=!ame_rays,limit=1] Rotation[0] float 1.0 run scoreboard players get #a randr + +scoreboard players set #a lim 181 +function bktsb:rng +scoreboard players set #a lim 90 +scoreboard players operation #a randr -= #a lim +execute store result entity @e[type=armor_stand,sort=nearest,nbt={Glowing:1b},tag=!ame_rays,limit=1] Rotation[1] float 1.0 run scoreboard players get #a randr + +tag @e[type=armor_stand,sort=nearest,nbt={Glowing:1b},tag=!ame_rays,limit=1] add ame_rays diff --git a/data/bktsb/functions/structgen/helpers/amethyst/generate.mcfunction b/data/bktsb/functions/structgen/helpers/amethyst/generate.mcfunction new file mode 100644 index 0000000..19719a4 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/amethyst/generate.mcfunction @@ -0,0 +1,20 @@ +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} diff --git a/data/bktsb/functions/structgen/helpers/amethyst/loop.mcfunction b/data/bktsb/functions/structgen/helpers/amethyst/loop.mcfunction new file mode 100644 index 0000000..dcd7362 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/amethyst/loop.mcfunction @@ -0,0 +1,3 @@ +execute if score #a looper matches ..0 run setblock ~ ~ ~ amethyst_block +execute positioned ~ ~1 ~ if score #a looper matches 1.. run function bktsb:structgen/helpers/amethyst/cast_ray +execute if score #a looper matches 1.. run scoreboard players operation #a looper -= #a loopstep diff --git a/data/bktsb/functions/structgen/helpers/amethyst/ray_tick.mcfunction b/data/bktsb/functions/structgen/helpers/amethyst/ray_tick.mcfunction new file mode 100644 index 0000000..9dca97b --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/amethyst/ray_tick.mcfunction @@ -0,0 +1,4 @@ +execute as @e[type=armor_stand,tag=ame_rays] at @s run tp @s ^ ^ ^1 +execute as @e[type=armor_stand,tag=ame_rays] at @s if block ~ ~ ~ amethyst_block run setblock ~ ~ ~ budding_amethyst +execute as @e[type=armor_stand,tag=ame_rays] at @s if block ~ ~ ~ calcite run kill @s +execute as @e[type=armor_stand,tag=ame_rays] at @s if block ~ ~ ~ smooth_basalt run kill @s diff --git a/data/bktsb/functions/structgen/helpers/dungeon/loot.mcfunction b/data/bktsb/functions/structgen/helpers/dungeon/loot.mcfunction new file mode 100644 index 0000000..a7f0f2e --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/dungeon/loot.mcfunction @@ -0,0 +1,22 @@ +scoreboard players set #a lim 4 +function bktsb:rng + +execute if score #a randr matches 0 run setblock ~-3 ~-1 ~-2 chest[facing=east] +execute if score #a randr matches 0 run data merge block ~-3 ~-1 ~-2 {LootTable:"minecraft:chests/simple_dungeon"} +execute if score #a randr matches 0 run setblock ~-2 ~-1 ~-3 chest[facing=south] +execute if score #a randr matches 0 run data merge block ~-2 ~-1 ~-3 {LootTable:"minecraft:chests/abandoned_mineshaft"} + +execute if score #a randr matches 1 run setblock ~-3 ~-1 ~2 chest[facing=east] +execute if score #a randr matches 1 run data merge block ~-3 ~-1 ~2 {LootTable:"minecraft:chests/simple_dungeon"} +execute if score #a randr matches 1 run setblock ~-2 ~-1 ~3 chest[facing=north] +execute if score #a randr matches 1 run data merge block ~-2 ~-1 ~3 {LootTable:"minecraft:chests/abandoned_mineshaft"} + +execute if score #a randr matches 2 run setblock ~3 ~-1 ~-2 chest[facing=west] +execute if score #a randr matches 2 run data merge block ~3 ~-1 ~-2 {LootTable:"minecraft:chests/simple_dungeon"} +execute if score #a randr matches 2 run setblock ~2 ~-1 ~-3 chest[facing=south] +execute if score #a randr matches 2 run data merge block ~2 ~-1 ~-3 {LootTable:"minecraft:chests/abandoned_mineshaft"} + +execute if score #a randr matches 3 run setblock ~3 ~-1 ~2 chest[facing=west] +execute if score #a randr matches 3 run data merge block ~3 ~-1 ~2 {LootTable:"minecraft:chests/simple_dungeon"} +execute if score #a randr matches 3 run setblock ~2 ~-1 ~3 chest[facing=north] +execute if score #a randr matches 3 run data merge block ~2 ~-1 ~3 {LootTable:"minecraft:chests/abandoned_mineshaft"} diff --git a/data/bktsb/functions/structgen/helpers/dungeon/room.mcfunction b/data/bktsb/functions/structgen/helpers/dungeon/room.mcfunction new file mode 100644 index 0000000..1f7cd21 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/dungeon/room.mcfunction @@ -0,0 +1,4 @@ +fill ~-4 ~-2 ~-4 ~4 ~3 ~4 cobblestone outline +setblock ~-4 ~-2 ~-4 minecraft:structure_block{name:"bktsb:dungeon_base",mode:"LOAD",ignoreEntities:1,rotation:"NONE",integrity:0.5} replace +setblock ~-4 ~-1 ~-4 redstone_block +setblock ~-4 ~-0 ~-4 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/dungeon/room_callback",TrackOutput:0} diff --git a/data/bktsb/functions/structgen/helpers/dungeon/room_callback.mcfunction b/data/bktsb/functions/structgen/helpers/dungeon/room_callback.mcfunction new file mode 100644 index 0000000..8db59a6 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/dungeon/room_callback.mcfunction @@ -0,0 +1,2 @@ +fill ~ ~-2 ~ ~8 ~-2 ~8 cobblestone replace air +fill ~ ~ ~ ~ ~-2 ~ cobblestone diff --git a/data/bktsb/functions/structgen/helpers/dungeon/spawner.mcfunction b/data/bktsb/functions/structgen/helpers/dungeon/spawner.mcfunction new file mode 100644 index 0000000..043156c --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/dungeon/spawner.mcfunction @@ -0,0 +1,6 @@ +setblock ~ ~ ~ spawner +scoreboard players set #a lim 4 +function bktsb:rng +execute if score #a randr matches 0..1 run data merge block ~ ~ ~ {MaxNearbyEntities: 6s, RequiredPlayerRange: 16s, SpawnCount: 4s, SpawnData: {id: "minecraft:zombie"}, MaxSpawnDelay: 800s, Delay: 500s, SpawnRange: 4s, MinSpawnDelay: 200s, SpawnPotentials: [{Entity: {id: "minecraft:zombie"}, Weight: 1}]} +execute if score #a randr matches 2 run data merge block ~ ~ ~ {MaxNearbyEntities: 6s, RequiredPlayerRange: 16s, SpawnCount: 4s, SpawnData: {id: "minecraft:skeleton"}, MaxSpawnDelay: 800s, Delay: 500s, SpawnRange: 4s, MinSpawnDelay: 200s, SpawnPotentials: [{Entity: {id: "minecraft:skeleton"}, Weight: 1}]} +execute if score #a randr matches 3 run data merge block ~ ~ ~ {MaxNearbyEntities: 6s, RequiredPlayerRange: 16s, SpawnCount: 4s, SpawnData: {id: "minecraft:spider"}, MaxSpawnDelay: 800s, Delay: 500s, SpawnRange: 4s, MinSpawnDelay: 200s, SpawnPotentials: [{Entity: {id: "minecraft:spider"}, Weight: 1}]} diff --git a/data/bktsb/functions/structgen/helpers/gen_bastion_helper.mcfunction b/data/bktsb/functions/structgen/helpers/gen_bastion_helper.mcfunction new file mode 100644 index 0000000..acdb77e --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/gen_bastion_helper.mcfunction @@ -0,0 +1,29 @@ +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] diff --git a/data/bktsb/functions/structgen/helpers/gen_end_ship_east_helper.mcfunction b/data/bktsb/functions/structgen/helpers/gen_end_ship_east_helper.mcfunction new file mode 100644 index 0000000..c791e15 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/gen_end_ship_east_helper.mcfunction @@ -0,0 +1,5 @@ +fill ~ ~ ~ ~ ~-29 ~ minecraft:air replace minecraft:redstone_block +setblock ~ ~ ~ minecraft:air +fill ~0 ~-25 ~-30 ~-30 ~-24 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/place_endship_loot_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Chest"} +fill ~0 ~-25 ~-30 ~-30 ~-24 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/place_elytra_west_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Elytra"} +fill ~0 ~-29 ~-30 ~-30 ~-18 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/summon_shulker_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Sentry"} diff --git a/data/bktsb/functions/structgen/helpers/gen_end_ship_north_helper.mcfunction b/data/bktsb/functions/structgen/helpers/gen_end_ship_north_helper.mcfunction new file mode 100644 index 0000000..15be5d9 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/gen_end_ship_north_helper.mcfunction @@ -0,0 +1,5 @@ +fill ~ ~ ~ ~ ~-29 ~ minecraft:air replace minecraft:redstone_block +setblock ~ ~ ~ minecraft:air +fill ~-30 ~-25 ~0 ~30 ~-24 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/place_endship_loot_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Chest"} +fill ~-30 ~-25 ~0 ~30 ~-24 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/place_elytra_south_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Elytra"} +fill ~-30 ~-29 ~0 ~30 ~-18 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/summon_shulker_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Sentry"} diff --git a/data/bktsb/functions/structgen/helpers/gen_end_ship_south_helper.mcfunction b/data/bktsb/functions/structgen/helpers/gen_end_ship_south_helper.mcfunction new file mode 100644 index 0000000..ae08db9 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/gen_end_ship_south_helper.mcfunction @@ -0,0 +1,5 @@ +fill ~ ~ ~ ~ ~-29 ~ minecraft:air replace minecraft:redstone_block +setblock ~ ~ ~ minecraft:air +fill ~-30 ~-25 ~0 ~30 ~-24 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/place_endship_loot_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Chest"} +fill ~-30 ~-25 ~0 ~30 ~-24 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/place_elytra_north_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Elytra"} +fill ~-30 ~-29 ~0 ~30 ~-18 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/summon_shulker_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Sentry"} diff --git a/data/bktsb/functions/structgen/helpers/gen_end_ship_west_helper.mcfunction b/data/bktsb/functions/structgen/helpers/gen_end_ship_west_helper.mcfunction new file mode 100644 index 0000000..a9fdfaf --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/gen_end_ship_west_helper.mcfunction @@ -0,0 +1,5 @@ +fill ~ ~ ~ ~ ~-29 ~ minecraft:air replace minecraft:redstone_block +setblock ~ ~ ~ minecraft:air +fill ~0 ~-25 ~-30 ~30 ~-24 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/place_endship_loot_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Chest"} +fill ~0 ~-25 ~-30 ~30 ~-24 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/place_elytra_east_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Elytra"} +fill ~0 ~-29 ~-30 ~30 ~-18 ~30 minecraft:command_block{auto:1,Command:"function bktsb:structgen/helpers/summon_shulker_and_vanish",TrackOutput:0} replace minecraft:structure_block{metadata:"Sentry"} diff --git a/data/bktsb/functions/structgen/helpers/gen_generic_helper.mcfunction b/data/bktsb/functions/structgen/helpers/gen_generic_helper.mcfunction new file mode 100644 index 0000000..931d0a5 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/gen_generic_helper.mcfunction @@ -0,0 +1,2 @@ +fill ~ ~ ~ ~ ~-12 ~ minecraft:air replace minecraft:redstone_block +setblock ~ ~ ~ minecraft:air diff --git a/data/bktsb/functions/structgen/helpers/place_bastion_common_loot_and_vanish.mcfunction b/data/bktsb/functions/structgen/helpers/place_bastion_common_loot_and_vanish.mcfunction new file mode 100644 index 0000000..2e3c599 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/place_bastion_common_loot_and_vanish.mcfunction @@ -0,0 +1,2 @@ +data modify block ~ ~-1 ~ LootTable set value "minecraft:chests/bastion_other" +setblock ~ ~ ~ minecraft:air diff --git a/data/bktsb/functions/structgen/helpers/place_bastion_treasure_loot_and_vanish.mcfunction b/data/bktsb/functions/structgen/helpers/place_bastion_treasure_loot_and_vanish.mcfunction new file mode 100644 index 0000000..eebe605 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/place_bastion_treasure_loot_and_vanish.mcfunction @@ -0,0 +1,2 @@ +data modify block ~ ~-1 ~ LootTable set value "minecraft:chests/bastion_treasure" +setblock ~ ~ ~ minecraft:air diff --git a/data/bktsb/functions/structgen/helpers/place_elytra_east_and_vanish.mcfunction b/data/bktsb/functions/structgen/helpers/place_elytra_east_and_vanish.mcfunction new file mode 100644 index 0000000..f990cd5 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/place_elytra_east_and_vanish.mcfunction @@ -0,0 +1,2 @@ +summon minecraft:item_frame ~ ~ ~ {Facing:5,Item:{id:"minecraft:elytra",Count:1}} +setblock ~ ~ ~ minecraft:air diff --git a/data/bktsb/functions/structgen/helpers/place_elytra_north_and_vanish.mcfunction b/data/bktsb/functions/structgen/helpers/place_elytra_north_and_vanish.mcfunction new file mode 100644 index 0000000..1562eff --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/place_elytra_north_and_vanish.mcfunction @@ -0,0 +1,2 @@ +summon minecraft:item_frame ~ ~ ~ {Facing:2,Item:{id:"minecraft:elytra",Count:1}} +setblock ~ ~ ~ minecraft:air diff --git a/data/bktsb/functions/structgen/helpers/place_elytra_south_and_vanish.mcfunction b/data/bktsb/functions/structgen/helpers/place_elytra_south_and_vanish.mcfunction new file mode 100644 index 0000000..0f67b21 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/place_elytra_south_and_vanish.mcfunction @@ -0,0 +1,2 @@ +summon minecraft:item_frame ~ ~ ~ {Facing:3,Item:{id:"minecraft:elytra",Count:1}} +setblock ~ ~ ~ minecraft:air diff --git a/data/bktsb/functions/structgen/helpers/place_elytra_west_and_vanish.mcfunction b/data/bktsb/functions/structgen/helpers/place_elytra_west_and_vanish.mcfunction new file mode 100644 index 0000000..a691b3a --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/place_elytra_west_and_vanish.mcfunction @@ -0,0 +1,2 @@ +summon minecraft:item_frame ~ ~ ~ {Facing:4,Item:{id:"minecraft:elytra",Count:1}} +setblock ~ ~ ~ minecraft:air diff --git a/data/bktsb/functions/structgen/helpers/place_endship_loot_and_vanish.mcfunction b/data/bktsb/functions/structgen/helpers/place_endship_loot_and_vanish.mcfunction new file mode 100644 index 0000000..f04df2d --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/place_endship_loot_and_vanish.mcfunction @@ -0,0 +1,2 @@ +data modify block ~ ~-1 ~ LootTable set value "minecraft:chests/end_city_treasure" +setblock ~ ~ ~ minecraft:air diff --git a/data/bktsb/functions/structgen/helpers/summon_shulker_and_vanish.mcfunction b/data/bktsb/functions/structgen/helpers/summon_shulker_and_vanish.mcfunction new file mode 100644 index 0000000..e2384d9 --- /dev/null +++ b/data/bktsb/functions/structgen/helpers/summon_shulker_and_vanish.mcfunction @@ -0,0 +1,2 @@ +summon minecraft:shulker ~ ~ ~ {Color:16} +setblock ~ ~ ~ minecraft:air |