I have a hallway with an enderman that has noAI and silent at the opposite end the player enters. When the player get's too close I want to change the mob's AI and have it rush the player then disappear before reaching the player. Changing the AI of the mob after it's spawned is my problem; everything else I can figure out. Is there a way of doing this without having to tp the mob then spawn a new one with different specs in its place?
I have a hallway with an enderman that has noAI and silent at the opposite end the player enters. When the player get's too close I want to change the mob's AI and have it rush the player then disappear before reaching the player. Changing the AI of the mob after it's spawned is my problem; everything else I can figure out. Is there a way of doing this without having to tp the mob then spawn a new one with different specs in its place?
To modify an entity data, use:
You can place a repeating command_block in the floor under the enderman and use this to unfreeze him when a player gets near:
Command block engineer // Developer // #TeamTrees
Some of my projects:
https://www.curseforge.com/members/megacrafter1077/projects
https://datapackcenter.com/projects/adventure.104/
My tutorials:
https://datapackcenter.com/projects/data-pack-basics.71/
https://datapackcenter.com/projects/loot-tables.72/
https://datapackcenter.com/projects/custom-crafting-tutorial.70/
https://datapackcenter.com/projects/custom-item-models-tutorial.69/
https://datapackcenter.com/projects/raycasting-tutorial.68/
I actually ended up using a different tactic but this will definitely help later on. Thank you very much.
Does anyone know how I can return the AI of all entities?