diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-03-20 01:35:40 +0100 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-03-20 13:25:45 +0100 |
commit | 0da9a66dc717b5b18fbba7cffa41ebd1c01f8a8a (patch) | |
tree | 1ff0575a793616ed67db949e9a1f47c71b57fff1 /data/vanilla_skyblock/functions | |
parent | 216d8166aaa321a4cfb5fef3510a1ee60c7dc9de (diff) |
use predicate for nether check and init
Diffstat (limited to 'data/vanilla_skyblock/functions')
-rw-r--r-- | data/vanilla_skyblock/functions/initialize.mcfunction | 8 | ||||
-rw-r--r-- | data/vanilla_skyblock/functions/initialize_nether.mcfunction | 6 | ||||
-rw-r--r-- | data/vanilla_skyblock/functions/tick.mcfunction | 8 |
3 files changed, 13 insertions, 9 deletions
diff --git a/data/vanilla_skyblock/functions/initialize.mcfunction b/data/vanilla_skyblock/functions/initialize.mcfunction index 7d36e93..66630e3 100644 --- a/data/vanilla_skyblock/functions/initialize.mcfunction +++ b/data/vanilla_skyblock/functions/initialize.mcfunction @@ -21,3 +21,11 @@ execute in the_end run forceload remove -1 -1 1 1 # set flag scoreboard players set initialized vanilla_skyblock_data 1 + + +# debug +fill -1 63 -2 2 63 -2 obsidian +fill -1 63 -2 -1 68 -2 obsidian +fill 2 63 -2 2 68 -2 obsidian +fill -1 68 -2 2 68 -2 obsidian +execute in overworld run item replace block 4 64 0 container.2 with flint_and_steel 1 diff --git a/data/vanilla_skyblock/functions/initialize_nether.mcfunction b/data/vanilla_skyblock/functions/initialize_nether.mcfunction index 4dcb5a5..5b5fe61 100644 --- a/data/vanilla_skyblock/functions/initialize_nether.mcfunction +++ b/data/vanilla_skyblock/functions/initialize_nether.mcfunction @@ -1,6 +1,8 @@ -tellraw @a "hi@nether!" +execute as @a in the_nether run setblock ~1 ~-1 0 glowstone +execute in the_nether run spawnpoint @s 5 5 5 -execute in the_nether run setblock 0 61 0 bedrock +execute as @s in the_nether run setblock ~2 ~-2 2 glowstone +# todo: get current location of nether spawn in # set flag scoreboard players set initialized_nether vanilla_skyblock_data 1 diff --git a/data/vanilla_skyblock/functions/tick.mcfunction b/data/vanilla_skyblock/functions/tick.mcfunction index 5e32c7a..ac0dd41 100644 --- a/data/vanilla_skyblock/functions/tick.mcfunction +++ b/data/vanilla_skyblock/functions/tick.mcfunction @@ -6,10 +6,4 @@ # re-place end_portal_frame # set scoreboard values to 1 for processed chunk -execute in the_nether unless score initialized_nether vanilla_skyblock_data matches 1 run function vanilla_skyblock:initialize_nether - -execute in the_nether unless score initialized_nether vanilla_skyblock_data matches 1 run tellraw @a "COOL" -execute unless score initialized_nether vanilla_skyblock_data matches 1 run tellraw @a "COOL!!" - -execute in overworld run tellraw @a "OI!!O" -execute in the_nether run tellraw @a "OI!!N" +execute as @a[predicate=vanilla_skyblock:in_nether] unless score initialized_nether vanilla_skyblock_data matches 1 run function vanilla_skyblock:initialize_nether |