diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-06-24 14:03:38 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-06-24 14:03:38 +0200 |
commit | 29513178db6308cb97fb0322df14097db2934536 (patch) | |
tree | 670e7abb62a8329b81061d99c378277ab2efd5b4 /data/onechunk | |
parent | 9ac1f75397a82c361c500edec6fdcb2e2e91d028 (diff) |
update to 1.21 and fix worldborder center call
Diffstat (limited to 'data/onechunk')
-rw-r--r-- | data/onechunk/function/initialize.mcfunction (renamed from data/onechunk/functions/initialize.mcfunction) | 23 | ||||
-rw-r--r-- | data/onechunk/function/load.mcfunction | 3 | ||||
-rw-r--r-- | data/onechunk/functions/load.mcfunction | 3 | ||||
-rw-r--r-- | data/onechunk/functions/tick.mcfunction | 0 |
4 files changed, 13 insertions, 16 deletions
diff --git a/data/onechunk/functions/initialize.mcfunction b/data/onechunk/function/initialize.mcfunction index 5d6766c..4d545a0 100644 --- a/data/onechunk/functions/initialize.mcfunction +++ b/data/onechunk/function/initialize.mcfunction @@ -26,18 +26,15 @@ execute store result score $chunkCenterZ onechunk_data run scoreboard players ge 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 ~ ~ +summon armor_stand ~ ~ ~ {NoGravity:1,Invulnerable:1,Invisible:1,Tags:["onechunk_chunk_center"]} +execute store result entity @e[tag=onechunk_chunk_center,limit=1] Pos[0] double 1 run scoreboard players get $chunkCenterX onechunk_data +execute store result entity @e[tag=onechunk_chunk_center,limit=1] Pos[2] double 1 run scoreboard players get $chunkCenterZ onechunk_data +execute store result entity @e[tag=onechunk_chunk_center,limit=1] Pos[1] double 1 run data get entity @p Pos[1] + +execute at @e[tag=onechunk_chunk_center,limit=1] run worldborder center ~ ~ +kill @e[tag=onechunk_chunk_center] + +# TODO: how to set to score? 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 -#X-1 -64 Z+15+1 X+15+1 219 Z+15+1 +scoreboard players set $initialized onechunk_data 1 diff --git a/data/onechunk/function/load.mcfunction b/data/onechunk/function/load.mcfunction new file mode 100644 index 0000000..bda726f --- /dev/null +++ b/data/onechunk/function/load.mcfunction @@ -0,0 +1,3 @@ +scoreboard objectives add onechunk_data dummy + +execute unless score $initialized onechunk_data matches 1 run function onechunk:initialize diff --git a/data/onechunk/functions/load.mcfunction b/data/onechunk/functions/load.mcfunction deleted file mode 100644 index 336a971..0000000 --- a/data/onechunk/functions/load.mcfunction +++ /dev/null @@ -1,3 +0,0 @@ -scoreboard objectives add onechunk_data dummy - -#function onechunk:initialize diff --git a/data/onechunk/functions/tick.mcfunction b/data/onechunk/functions/tick.mcfunction deleted file mode 100644 index e69de29..0000000 --- a/data/onechunk/functions/tick.mcfunction +++ /dev/null |