From 77f0e689f84a601f5da4aaf2308bccf74a531346 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 24 Jul 2021 16:59:58 +0800 Subject: Initial public release (minecraft 1.17.1). --- .../structgen/helpers/dungeon/loot.mcfunction | 22 ++++++++++++++++++++++ .../structgen/helpers/dungeon/room.mcfunction | 4 ++++ .../helpers/dungeon/room_callback.mcfunction | 2 ++ .../structgen/helpers/dungeon/spawner.mcfunction | 6 ++++++ 4 files changed, 34 insertions(+) create mode 100644 data/bktsb/functions/structgen/helpers/dungeon/loot.mcfunction create mode 100644 data/bktsb/functions/structgen/helpers/dungeon/room.mcfunction create mode 100644 data/bktsb/functions/structgen/helpers/dungeon/room_callback.mcfunction create mode 100644 data/bktsb/functions/structgen/helpers/dungeon/spawner.mcfunction (limited to 'data/bktsb/functions/structgen/helpers/dungeon') 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}]} -- cgit v1.2.3