summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
Diffstat (limited to 'data')
-rw-r--r--data/onechunk/functions/initialize.mcfunction19
-rw-r--r--data/onechunk/functions/load.mcfunction2
2 files changed, 19 insertions, 2 deletions
diff --git a/data/onechunk/functions/initialize.mcfunction b/data/onechunk/functions/initialize.mcfunction
index 446e061..5d6766c 100644
--- a/data/onechunk/functions/initialize.mcfunction
+++ b/data/onechunk/functions/initialize.mcfunction
@@ -18,8 +18,25 @@ execute store result score $tmp onechunk_data run scoreboard players get $posZ o
scoreboard players operation $tmp onechunk_data %= $chunkSize onechunk_data
scoreboard players operation $chunkStartZ onechunk_data -= $tmp onechunk_data
-fill
+execute store result score $chunkCenterX onechunk_data run scoreboard players get $chunkStartX onechunk_data
+scoreboard players set $tmp onechunk_data 8
+scoreboard players operation $chunkCenterX onechunk_data += $tmp onechunk_data
+execute store result score $chunkCenterZ onechunk_data run scoreboard players get $chunkStartZ onechunk_data
+scoreboard players set $tmp onechunk_data 8
+scoreboard players operation $chunkCenterZ onechunk_data += $tmp onechunk_data
+
+summon armor_stand ~ ~ ~ {NoGravity:1,Invulnerable:1,Invisible:1,Tags:["teleport_target"]}
+execute store result entity @e[tag=teleport_target,limit=1] Pos[0] double 1 run scoreboard players get $chunkCenterX onechunk_data
+execute store result entity @e[tag=teleport_target,limit=1] Pos[2] double 1 run scoreboard players get $chunkCenterZ onechunk_data
+execute store result entity @e[tag=teleport_target,limit=1] Pos[1] double 1 run data get entity @p Pos[1]
+
+tp @p @e[tag=teleport_target,limit=1]
+kill @e[tag=teleport_target]
+execute as @p run worldborder center ~ ~
+worldborder set 16
+
+#fill
#X-1 -64 Z-1 X+15+1 319 Z-1
#X-1 -64 Z-1 X-1 219 Z+15+1
#X+15+1 -64 Z-1 X+15+1 219 Z+15+1
diff --git a/data/onechunk/functions/load.mcfunction b/data/onechunk/functions/load.mcfunction
index 05cdd4f..336a971 100644
--- a/data/onechunk/functions/load.mcfunction
+++ b/data/onechunk/functions/load.mcfunction
@@ -1,3 +1,3 @@
scoreboard objectives add onechunk_data dummy
-function onechunk:initialize
+#function onechunk:initialize