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/helpers | |
download | bktmc-skyblock-77f0e689f84a601f5da4aaf2308bccf74a531346.tar.xz |
Initial public release (minecraft 1.17.1).
Diffstat (limited to 'data/bktsb/functions/structgen/helpers')
22 files changed, 141 insertions, 0 deletions
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 |