Skip to content

Commit

Permalink
DP | Fix teleportation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Nik0-0 committed Feb 27, 2024
1 parent 7315e5e commit 4dbb5c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
scoreboard players remove ticks nn_spawn 1
$execute unless entity @e[tag=$(bot_name)] run scoreboard players set spawn nn_nextbot_spawn $(id)
$execute if score ticks nn_spawn <= 0 nn_spawn run tp @e[tag=$(bot_name)_z] @e[tag=$(map),limit=1,sort=random]
$execute if score ticks nn_spawn <= 0 nn_spawn run tp @e[tag=$(bot_name)_z,tag=!done] @e[tag=$(map),limit=1,sort=random]
$execute if score ticks nn_spawn <= 0 nn_spawn run tag @e[tag=$(bot_name)_z,tag=!done] add done
$execute if score ticks nn_spawn <= 0 nn_spawn run tellraw @a[tag=debug] "$(bot_name) $(id) $(map)"
execute if score ticks nn_spawn <= 0 nn_spawn run scoreboard players set ticks nn_spawn 20
3 changes: 2 additions & 1 deletion nnb_spawnsystem/main.jmc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ function setup_bots() {
scoreboard players remove ticks nn_spawn 1;
$execute unless entity @e[tag=$(bot_name)] run scoreboard players set spawn nn_nextbot_spawn $(id);

$execute if score ticks nn_spawn <= 0 nn_spawn run tp @e[tag=$(bot_name)_z] @e[tag=$(map),limit=1,sort=random];
$execute if score ticks nn_spawn <= 0 nn_spawn run tp @e[tag=$(bot_name)_z,tag=!done] @e[tag=$(map),limit=1,sort=random];
$execute if score ticks nn_spawn <= 0 nn_spawn run tag @e[tag=$(bot_name)_z,tag=!done] add done;
$execute if score ticks nn_spawn <= 0 nn_spawn run tellraw @a[tag=debug] "$(bot_name) $(id) $(map)";
execute if score ticks nn_spawn <= 0 nn_spawn run scoreboard players set ticks nn_spawn 20;

Expand Down

0 comments on commit 4dbb5c2

Please sign in to comment.