This repository has been archived by the owner on Sep 6, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #13 - Structures aren't actually seeded
- Loading branch information
Showing
17 changed files
with
48 additions
and
44 deletions.
There are no files selected for viewing
5 changes: 2 additions & 3 deletions
5
ttb_data/data/ttb/functions/util/generate_loot_table_seed.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
execute unless entity @s unless entity @e[type=area_effect_cloud,tag=ttb_temp,tag=init,limit=1] run summon area_effect_cloud ~ ~ ~ {Tags:["ttb_temp","init"],CustomName:'"ttb_temp"'} | ||
execute if entity @s unless entity @e[type=area_effect_cloud,tag=ttb_temp,tag=init,limit=1] at @s run summon area_effect_cloud ~ ~ ~ {Tags:["ttb_temp","init"],CustomName:'"ttb_temp"'} | ||
execute as @e[type=area_effect_cloud,tag=ttb_temp,tag=init,limit=1] run function ttb:util/generate_loot_table_seed_post | ||
summon area_effect_cloud ~ ~ ~ {Tags:["ttb_temp"],CustomName:'"ttb_temp"'} | ||
execute as @e[type=area_effect_cloud,tag=ttb_temp,distance=...1,limit=1] run function ttb:util/generate_loot_table_seed_post |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
ttb_data/data/ttb/functions/world/structure/check_spawn/append.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# called by world/structure/check_spawn/... | ||
|
||
summon area_effect_cloud ~ ~ ~ {Tags:["ttb_temp"],CustomName:'"ttb_temp"'} | ||
execute as @e[type=area_effect_cloud,tag=ttb_temp,distance=...1,limit=1] in overworld positioned 29999984 253 29999984 run function ttb:world/structure/check_spawn/append_post |
21 changes: 21 additions & 0 deletions
21
ttb_data/data/ttb/functions/world/structure/check_spawn/append_post.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# called by world/structure/check_spawn/append | ||
|
||
# pre | ||
forceload add ~ ~ | ||
|
||
# run checks | ||
setblock ~ ~ ~ yellow_shulker_box | ||
|
||
data modify block ~ ~ ~ LootTable set from storage ttb:temp structure_spawn_table | ||
function ttb:util/generate_loot_table_seed_post | ||
|
||
loot replace block ~ ~ ~ container.0 mine ~ ~ ~ air{drop_contents:1b} | ||
|
||
data modify block ~ ~ ~ Items[0].tag.ttb.world.structure.integrity set from block ~ ~ ~ Items[0].tag.AttributeModifiers[{Name:"ttb:integrity"}].Amount | ||
data modify block ~ ~ ~ Items[0].tag.ttb.world.structure.height set from block ~ ~ ~ Items[0].tag.AttributeModifiers[{Name:"ttb:height"}].Amount | ||
data modify storage ttb:temp world.structure.spawns append from block ~ ~ ~ Items[0].tag.ttb.world.structure | ||
|
||
# post | ||
setblock ~ ~ ~ air | ||
forceload remove ~ ~ | ||
kill @s |
5 changes: 2 additions & 3 deletions
5
ttb_data/data/ttb/functions/world/structure/check_spawn/cold.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# called by world/structure/chunk | ||
|
||
function ttb:world/structure/check_spawn/pre | ||
data modify block ~ ~ ~ LootTable set value 'ttb:world/structure/check_spawn/cold' | ||
function ttb:world/structure/check_spawn/post | ||
data modify storage ttb:temp structure_spawn_table set value 'ttb:world/structure/check_spawn/cold' | ||
function ttb:world/structure/check_spawn/append |
5 changes: 2 additions & 3 deletions
5
ttb_data/data/ttb/functions/world/structure/check_spawn/ore.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# called by world/structure/chunk | ||
|
||
function ttb:world/structure/check_spawn/pre | ||
data modify block ~ ~ ~ LootTable set value 'ttb:world/structure/check_spawn/ore' | ||
function ttb:world/structure/check_spawn/post | ||
data modify storage ttb:temp structure_spawn_table set value 'ttb:world/structure/check_spawn/ore' | ||
function ttb:world/structure/check_spawn/append |
8 changes: 0 additions & 8 deletions
8
ttb_data/data/ttb/functions/world/structure/check_spawn/post.mcfunction
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
ttb_data/data/ttb/functions/world/structure/check_spawn/pre.mcfunction
This file was deleted.
Oops, something went wrong.
5 changes: 2 additions & 3 deletions
5
ttb_data/data/ttb/functions/world/structure/check_spawn/snowy.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
# called by world/structure/chunk | ||
|
||
function ttb:world/structure/check_spawn/pre | ||
data modify block ~ ~ ~ LootTable set value 'ttb:world/structure/check_spawn/snowy' | ||
function ttb:world/structure/check_spawn/post | ||
data modify storage ttb:temp structure_spawn_table set value 'ttb:world/structure/check_spawn/snowy' | ||
function ttb:world/structure/check_spawn/append |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
ttb_data/data/ttb/functions/world/structure/dungeon/get_room.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
summon area_effect_cloud ~ ~ ~ {Tags:["ttb_temp"],CustomName:'"ttb_temp"'} | ||
execute as @e[type=area_effect_cloud,tag=ttb_temp,distance=...1,limit=1] positioned 29999984 253 29999984 run function ttb:world/structure/dungeon/get_room_post | ||
execute as @e[type=area_effect_cloud,tag=ttb_temp,distance=...1,limit=1] in overworld positioned 29999984 253 29999984 run function ttb:world/structure/dungeon/get_room_post |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 3 additions & 4 deletions
7
ttb_data/data/ttb/functions/world/structure/spawn_id.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
# called by world/structure/loop_spawns | ||
|
||
data modify storage ttb:temp check_string set value [] | ||
data modify storage ttb:temp check_string append from storage ttb:temp world.structure.spawns[0] | ||
data modify storage ttb:temp check.compound set from storage ttb:temp world.structure.spawns[0] | ||
|
||
execute if data storage ttb:temp check_string[{id:'large_wooden_snow_dungeon'}] positioned ~ ~-16 ~ run function ttb:world/structure/large_wooden_snow_dungeon/create | ||
execute if data storage ttb:temp check.compound{id:'large_wooden_snow_dungeon'} positioned ~ ~-16 ~ run function ttb:world/structure/large_wooden_snow_dungeon/create | ||
|
||
data remove storage ttb:temp check_string | ||
data remove storage ttb:temp check.compound |