diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-05-22 23:21:42 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-05-22 23:21:42 +0200 |
commit | 9ac1f75397a82c361c500edec6fdcb2e2e91d028 (patch) | |
tree | c29b0de8a77a69f4930a156b9ebccadb657c0a97 | |
parent | a0a602653d34b831a7ffbe0cecf8a6bf3bd26016 (diff) |
initial commit
-rw-r--r-- | data/onechunk/functions/initialize.mcfunction | 19 | ||||
-rw-r--r-- | data/onechunk/functions/load.mcfunction | 2 |
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 |