3

Remove entitys in unloadet chunks

Flyrr 8/22/21 11:03 am
1.7k
8/23/2021 3:23 am
Is there a way to kill entitys in unloaded chunks?

Because everytime i shoot a spell (in my magic datapack) into an unloaded chunk and then load the chunk and then use the spell again i get a big lagspike.
Posted by
Flyrr
Level 52 : Grandmaster Wizard
225

  Have something to say?

JoinSign in

5

HoboMaggot
08/22/2021 10:18 pm
Level 55 : Grandmaster Blob
history
Is there a way to kill entitys in unloaded chunks?
You cant, unless you already have entity context througn something like a function (im pretty sure).
e.g.
execute as @e[​custom_mob] run function custom_func

In custom_func:
Do stuff as that entity
kill that entity (using @s)

Also can you elaborate on what is casuing ur lagspike? Does you spell (assuming it's something shot like a fireball) have a max range? Did you spam a bunch in a direction and load a huge amt of entities?
2
Flyrr
08/23/2021 2:16 am
Level 52 : Grandmaster Wizard
Its an armorstand that executes an lagspike, no it has no max range. Umm… no i didnt spam it, the lagspike happens when i shoot one spell in an unloadet chunk, and then load that chunk and shoot another spell
3
HoboMaggot
08/23/2021 3:23 am
Level 55 : Grandmaster Blob
what commands does your armorstand have? Does it summon any other entities as it travels to the other chunks?
2
Flyrr
08/23/2021 3:23 am
Level 52 : Grandmaster Wizard
No, just the raycast and particles
3
Flyrr
08/23/2021 3:23 am
Level 52 : Grandmaster Wizard
Umm... and an /effect command
3

Welcome