> ## Documentation Index
> Fetch the complete documentation index at: https://entities.lodemc.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Entity State

> Names, AI, gravity, glow, fire, owners and stances, tags, experience, time and weather, and entity-specific tricks.

Changing what an entity is or how it behaves, rather than hurting or moving it.

```yaml theme={null}
- setai{ai=false} +onSpawn @self          # a statue until told otherwise
- setname{name=&c<caster.name> (enraged)} +onHurt <50%
- glow{glowing=true} @self
- cancelevent +onInteract                 # stop the vanilla right-click (a villager's trades)
- setfaction{faction=undead} @trigger     # turn the attacker to your side
```

| Mechanic | Usage | What it does |
| :- | :- | :- |
| `animatearmorstand` <sub>also animateas, animas</sub> | `animateArmorStand{duration=20;head=x,y,z;…}` | Moves an armor stand into a pose over time. |
| `cancelevent` | `cancelevent` | Cancels the game event that fired this line (the damage, the interaction…). Only works before the first `delay`. |
| `clearexperience` <sub>also clearexp</sub> | `clearExperience` | Clears a player's experience. |
| `clearexperiencelevels` <sub>also clearexplevels</sub> | `clearExperienceLevels` | Clears a player's experience levels. |
| `closeinventory` | `closeInventory` | Closes a player's open inventory. |
| `disguise` <sub>also disguisetarget, disguiseasblock, disguisemodify, modifydisguise</sub> | `disguise{disguise=<type>}` | Disguises the target. Needs LibsDisguises. |
| `displaytransformation` <sub>also settransformation, transformation</sub> | `displayTransformation{action=SET;type=TRANSLATION;value=0,0,0}` | Sets or adds to a display entity's translation, scale or rotation. |
| `doppleganger` <sub>also copyplayer</sub> | `doppleganger{hasNamePlate=true}` | Disguises the caster as the target. Needs LibsDisguises. |
| `enderdragonresetcrystals` | `enderDragonResetCrystals` | Resets the end crystals of the dragon fight. |
| `enderdragonsetphase` <sub>also setenderdragonphase</sub> | `enderDragonSetPhase{phase=CIRCLING}` | Sets an ender dragon's behaviour phase. |
| `enderdragonsetrespawnphase` <sub>also setenderdragonrespawnphase</sub> | `enderDragonSetRespawnPhase{phase=NONE}` | Sets the dragon fight's respawn phase. |
| `enderdragonspawnportal` <sub>also spawnenderdragonportal</sub> | `enderDragonSpawnPortal{withPortals=false}` | Generates the end exit portal. |
| `extinguish` | `extinguish` | Puts out fire on the target. |
| `freeze` | `freeze{duration=5s}` | Applies the powder-snow freeze to the target. |
| `giveexperiencelevels` <sub>also giveexplevels</sub> | `giveExperienceLevels{amount=<n>}` | Gives a player experience levels. |
| `glow` <sub>also setglowing</sub> | `glow{glowing=true}` | Turns the outline glow on or off. A permanent toggle; for a timed, coloured glow use `effect:glow`. |
| `goatram` | `goatRam` | Makes a goat ram the target. |
| `ignite` | `ignite{duration=3s}` | Sets the target on fire. |
| `posearmorstand` <sub>also armorstandpose</sub> | `poseArmorStand{head=x,y,z;body=…}` | Sets an armor stand's pose. |
| `remove` <sub>also delete, despawn</sub> | `remove{onRemove=<skill>}` | Removes the target from the world (never a player). No drops, no death. |
| `removefire` | `removefire` | Puts out fire on the target. |
| `removeowner` <sub>also clearowner</sub> | `removeOwner` | Clears the caster's owner. |
| `resetai` <sub>also resetaigoals</sub> | `resetAI` | Restores the caster's default AI goals. |
| `runaigoalselector` <sub>also aigoal, aigoals</sub> | `runAIGoalSelector{goal=clear}` | Edits the caster's AI goals. Supports `clear` and `remove <goal>`. |
| `runaitargetselector` <sub>also aitarget</sub> | `runAITargetSelector{target=clear}` | Edits the caster's AI target selectors. Supports `clear` and `remove <goal>`. |
| `saddle` <sub>also givesaddle, setsaddle</sub> | `saddle{take=false}` | Puts a saddle on the target, or takes it off. |
| `setai` <sub>also ai</sub> | `setai{ai=true}` | Turns the target's AI off or on. Stays that way until set back. |
| `setchunkforceloaded` | `setChunkForceLoaded{loaded=true}` | Force-loads, or releases, the target location's chunk. |
| `setcollidable` | `setcollidable{collidable=true}` | Sets whether other entities collide with the target. |
| `setdisplayentityitem` | `setDisplayEntityItem{item=<item>}` | Sets the item an item display shows. |
| `setdragonpodium` <sub>also setpodium, podium</sub> | `setDragonPodium` | Sets where the dragon fight's podium is. |
| `setfaction` | `setfaction{faction=<name>}` | Moves this one spawned entity to another faction until it dies. |
| `setflying` | `setFlying{flying=true}` | Starts or stops a player flying. |
| `setgamemode` | `setgamemode{mode=SURVIVAL}` | Sets a player's game mode. |
| `setgliding` | `setGliding{gliding=true}` | Starts or stops elytra gliding. |
| `setgravity` <sub>also setusegravity</sub> | `setgravity{gravity=true}` | Turns gravity off or on for the target. |
| `setinteractionsize` <sub>also interactionsize</sub> | `setInteractionSize{width=1;height=1}` | Resizes an interaction entity. |
| `setmaterialcooldown` | `setMaterialCooldown{material=<item>;duration=100}` | Puts an item type on cooldown for a player. |
| `setmobcolor` <sub>also setcolor</sub> | `setmobcolor{color=WHITE}` | Sets the colour of a colourable mob (sheep, shulker, …). |
| `setname` <sub>also setmobname</sub> | `setname{name=<text>}` | Sets the target's visible name. |
| `setowner` | `setOwner` | Makes the target the caster's owner. |
| `setparent` | `setParent` | Makes the target the caster's parent. |
| `setpathfindingmalus` <sub>also setmalus, malus</sub> | `setPathfindingMalus{type=<path type>;value=<n>}` | Changes how much a mob avoids a kind of terrain when pathfinding. |
| `setraidercanjoinraid` <sub>also setcanjoinraid</sub> | `setRaiderCanJoinRaid{can=true}` | Sets whether a raider can join raids. |
| `setraiderpatrolblock` <sub>also setraiderblock</sub> | `setRaiderPatrolBlock` | Sets the spot a raider patrols to. |
| `setraiderpatrolleader` <sub>also setraiderleader</sub> | `setRaiderPatrolLeader{leader=true}` | Makes a raider a patrol leader, or not. |
| `setspeed` | `setspeed{speed=<n>;type=WALK}` | Sets the target's movement (or flying) speed. |
| `setstance` <sub>also stance</sub> | `setStance{stance=<name>}` | Sets the target mob's stance, readable by the `stance` condition. |
| `settextdisplay` <sub>also settext</sub> | `setTextDisplay{text=<text>}` | Sets the text a text display shows. |
| `settonguetarget` <sub>also tonguetarget</sub> | `setTongueTarget` | Makes a frog's tongue grab the target. |
| `settrackedlocation` <sub>also tracklocation, stl</sub> | `setTrackedLocation` | Stores the target location on the caster for later use. |
| `showentity` <sub>also showplayer</sub> | `showEntity` | Shows the caster again to players it was hidden from. |
| `stopusingitem` <sub>also releaseitem</sub> | `stopUsingItem` | Stops the target using its item (lowers a shield, cancels eating). |
| `suicide` | `suicide` | Kills the caster, firing its `+onDeath` lines. |
| `swingarm` <sub>also armanimation</sub> | `swingArm` | Makes the caster swing its arm. |
| `tagadd` <sub>also addtag, addscoreboardtag</sub> | `tagAdd{tag=<name>}` | Adds a scoreboard tag to the target. |
| `tagremove` <sub>also removetag, removescoreboardtag</sub> | `tagRemove{tag=<name>}` | Removes a scoreboard tag from the target. |
| `takeexperiencelevels` <sub>also takeexplevels</sub> | `takeExperienceLevels{amount=<n>}` | Takes experience levels from a player. |
| `time` <sub>also settime</sub> | `time{amount=<ticks>;mode=SET\|ADD\|RESET;personal=false}` | Sets or adds to the world time, or a player's own time with `personal=true`. |
| `togglesitting` <sub>also sit</sub> | `toggleSitting{state=<bool>}` | Makes a cat or dog sit or stand. |
| `undisguise` <sub>also disguiseremove</sub> | `undisguise` | Removes a disguise. Needs LibsDisguises. |
| `weather` | `weather{type=sunny\|rain\|thunder;duration=10s}` | Changes the weather for a while. |
| `wolfsit` | `wolfSit{sit=true}` | Makes a wolf sit or stand. |

## Good to know

* **AI goals.** `runAIGoalSelector` and `runAITargetSelector` can clear goals or remove one, which is how the starter mobs swap out their vanilla attack (`runaigoalselector{goal=remove blaze_attack}`). Adding new goals is not supported yet.
* **Disguises need LibsDisguises.** Without it, `disguise`, `undisguise` and `doppleganger` do nothing.
* `glow` is LodeEntities' permanent outline toggle. MythicMobs' timed, coloured glow is the `effect:glow` aura; the [importer](https://entities.lodemc.net/mythicmobs.md) renames it for you.
* `freeze`, `time` and `weather` keep LodeEntities' own defaults; an imported MythicMobs line gets MythicMobs' defaults written out.
* To make a mob a statue from the start, set `ai: false` on the [mob](https://entities.lodemc.net/mob-fields.md) rather than calling `setai` on spawn.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.