aboutsummaryrefslogtreecommitdiff
path: root/data/bktsb/functions/structgen/helpers/dungeon
diff options
context:
space:
mode:
Diffstat (limited to 'data/bktsb/functions/structgen/helpers/dungeon')
-rw-r--r--data/bktsb/functions/structgen/helpers/dungeon/loot.mcfunction22
-rw-r--r--data/bktsb/functions/structgen/helpers/dungeon/room.mcfunction4
-rw-r--r--data/bktsb/functions/structgen/helpers/dungeon/room_callback.mcfunction2
-rw-r--r--data/bktsb/functions/structgen/helpers/dungeon/spawner.mcfunction6
4 files changed, 34 insertions, 0 deletions
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}]}