#(jcwultrafan) Is there a way to remove mob AI when they naturalyl spawn?
18 messages · Page 1 of 1 (latest)
(jcwultrafan) Is there a way to remove mob AI when they naturalyl spawn?
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
!e entity spawns
Entity
This event may fire very rapidly.
<entity> spawns (because <cause>)
when an entity spawns.
<context.entity> returns the EntityTag that spawned.
<context.location> returns the location the entity will spawn at.
<context.reason> returns the reason the entity spawned, can be ENTITY_SPAWN or any of: <@link url ...
<context.spawner_location> returns the location of the mob spawner, when reason is SPAWNER.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
!m entitytag.has_ai
(Property) Controls whether this entity will use the default Minecraft AI to roam and look around.
This tends to have implications for other vanilla functionality, including gravity.
This generally shouldn't be used with NPCs. NPCs do not have vanilla AI, regardless of what this tag returns.
Other programmatic methods of blocking AI might also not be accounted for by this tag.
Properties
EntityTag
ElementTag(Boolean)
<EntityTag.has_ai> (Property) Controls whether this entity will use the default Minecraft AI to ro...
I see! Thanks so much! Is there a way to just freeze them in place without having to remove their ability to shoot projectiles?
Could maybe give them slowness
Ah, okay. So my problem is that Withers are eating 20% of tps through aiStep and I was wondering if there's a way to mitigate it with that
I don't think so
!spark
The "timings" system within Spigot/Paper is incredibly inaccurate for use with Citizens, and cannot be used to diagnose any issues related to Citizens. It notably blames Citizens for a significant amount of entity-related lag (that isn't in any way caused by Citizens).
For accurate timings, you need a Java profiler. There are a variety of profiler options (WarmRoast, YourKit, VisualVM, ...), but the simplest to use on a Spigot server is a plugin named "Spark" that embeds WarmRoast, which you can find here: https://www.spigotmc.org/resources/spark.57242/.
To get a spark report, type /spark profiler start, then replicate lag issues (for no more than about a minute), then /spark profiler stop, and post the link it gives you.
yup I am using Spark:
Do you guys think cancelling this will help with the lag? 🤔