diff --git a/nnb_spawnsystem/data/nnb_spawnsystem/functions/setup_bots.mcfunction b/nnb_spawnsystem/data/nnb_spawnsystem/functions/setup_bots.mcfunction index 258ec4a..f7842fc 100644 --- a/nnb_spawnsystem/data/nnb_spawnsystem/functions/setup_bots.mcfunction +++ b/nnb_spawnsystem/data/nnb_spawnsystem/functions/setup_bots.mcfunction @@ -1,6 +1,7 @@ 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,tag=!done] @e[tag=$(map),limit=1,sort=random] +$execute if score ticks nn_spawn <= 0 nn_spawn at @e[tag=$(bot_name)_z,tag=!done] run summon minecraft:lightning_bolt ~ ~ ~ $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 \ No newline at end of file diff --git a/nnb_spawnsystem/main.jmc b/nnb_spawnsystem/main.jmc index ab9f4b3..5a67d0d 100644 --- a/nnb_spawnsystem/main.jmc +++ b/nnb_spawnsystem/main.jmc @@ -164,6 +164,7 @@ function setup_bots() { $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,tag=!done] @e[tag=$(map),limit=1,sort=random]; + $execute if score ticks nn_spawn <= 0 nn_spawn run execute at @e[tag=$(bot_name)_z,tag=!done] run summon minecraft:lightning_bolt ~ ~ ~; $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;