summaryrefslogtreecommitdiff
path: root/data/vanilla_skyblock/functions
diff options
context:
space:
mode:
Diffstat (limited to 'data/vanilla_skyblock/functions')
-rw-r--r--data/vanilla_skyblock/functions/initialize.mcfunction23
-rw-r--r--data/vanilla_skyblock/functions/initialize_nether.mcfunction6
-rw-r--r--data/vanilla_skyblock/functions/load.mcfunction3
-rw-r--r--data/vanilla_skyblock/functions/tick.mcfunction15
4 files changed, 47 insertions, 0 deletions
diff --git a/data/vanilla_skyblock/functions/initialize.mcfunction b/data/vanilla_skyblock/functions/initialize.mcfunction
new file mode 100644
index 0000000..7d36e93
--- /dev/null
+++ b/data/vanilla_skyblock/functions/initialize.mcfunction
@@ -0,0 +1,23 @@
+setworldspawn 0 64 0
+gamerule spawnRadius 0
+
+execute in overworld run fill 4 63 -1 -1 63 1 grass_block
+execute in overworld run fill 4 62 -1 -1 61 1 dirt
+execute in overworld run fill 1 63 2 -1 63 4 grass_block
+execute in overworld run fill 1 62 2 -1 61 4 dirt
+execute in overworld run setblock 0 61 0 bedrock
+
+#execute in overworld run fill -1 64 4 -1 69 3 oak_log
+execute in overworld run place feature oak -1 64 4
+
+execute in overworld run setblock 4 64 0 chest[facing=west]
+execute in overworld run item replace block 4 64 0 container.0 with ice 1
+execute in overworld run item replace block 4 64 0 container.1 with lava_bucket 1
+
+# end
+execute in the_end run forceload add -1 -1 1 1
+execute in the_end run setblock 0 61 0 bedrock
+execute in the_end run forceload remove -1 -1 1 1
+
+# set flag
+scoreboard players set initialized vanilla_skyblock_data 1
diff --git a/data/vanilla_skyblock/functions/initialize_nether.mcfunction b/data/vanilla_skyblock/functions/initialize_nether.mcfunction
new file mode 100644
index 0000000..4dcb5a5
--- /dev/null
+++ b/data/vanilla_skyblock/functions/initialize_nether.mcfunction
@@ -0,0 +1,6 @@
+tellraw @a "hi@nether!"
+
+execute in the_nether run setblock 0 61 0 bedrock
+
+# set flag
+scoreboard players set initialized_nether vanilla_skyblock_data 1
diff --git a/data/vanilla_skyblock/functions/load.mcfunction b/data/vanilla_skyblock/functions/load.mcfunction
new file mode 100644
index 0000000..9264728
--- /dev/null
+++ b/data/vanilla_skyblock/functions/load.mcfunction
@@ -0,0 +1,3 @@
+scoreboard objectives add vanilla_skyblock_data dummy
+
+execute unless score initialized vanilla_skyblock_data matches 1 run function vanilla_skyblock:initialize
diff --git a/data/vanilla_skyblock/functions/tick.mcfunction b/data/vanilla_skyblock/functions/tick.mcfunction
new file mode 100644
index 0000000..5e32c7a
--- /dev/null
+++ b/data/vanilla_skyblock/functions/tick.mcfunction
@@ -0,0 +1,15 @@
+# get render distance
+# for each current chunk +- render distance (and not in scoreboard)
+ # check for end_portal_frame
+ # get positions
+ # fill chunk with air
+ # 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"