#(jcwultrafan) Is there a way to remove mob AI when they naturalyl spawn?

18 messages · Page 1 of 1 (latest)

final ice
#

As title mentions. I'm trying to remove AI from specific mobs when they spawn

half robinBOT
#

(jcwultrafan) Is there a way to remove mob AI when they naturalyl spawn?

half robinBOT
#

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.

shy surge
#

!e entity spawns

astral yarrowBOT
# shy surge !e entity spawns
Group

Entity

**WARNING**

This event may fire very rapidly.

Event Lines

<entity> spawns (because <cause>)

Triggers

when an entity spawns.

Context

<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.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

shy surge
#

!m entitytag.has_ai

astral yarrowBOT
# shy surge !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.

Group

Properties

Object

EntityTag

Input

ElementTag(Boolean)

Tags

<EntityTag.has_ai> (Property) Controls whether this entity will use the default Minecraft AI to ro...

final ice
# shy surge !m entitytag.has_ai

I see! Thanks so much! Is there a way to just freeze them in place without having to remove their ability to shoot projectiles?

shy surge
#

Could maybe give them slowness

final ice
shy surge
#

I don't think so

astral yarrowBOT
# fluid estuary !spark
Info: 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.

final ice
#

Do you guys think cancelling this will help with the lag? 🤔

mint garnet
#

Please post the full report

#

the link