Hello! I would to know how i can spawn a entity that doesn't move... Kinda like NPC's if someone can help that be great! Thanks
If you don't wanna change NMS pathfinding goals, you can always put the potioneffect slowness and put the amplifier to something like 10. That should freeze the mob (I used to do this). The best way is to use the pathfinding goals to remove the goals of following a player, etc, and make it stand still. Don't forget collision is a factor to freezing a mob, and the potioneffect won't do anything.
Well, to offer a complete solution, call this on your entity (not nms entity): entityObj.setAI(false);
Simplest way is to give the entity a slowness potion effect with max duration and max amplifier. It will take _forever_ for it to move even one pixel. If you don't want players to be able to push it, teleport it back to where you want it on a repeating task.
@1010bobIzCOOL What MC version are you coding this for? We're gonna need more info to provide an actual working solution, depending on your version.
3 ways: Remove all Pathfinders Use NMS to set No AI to 1 (I am unsure if there is a non NMS method for this in 1.9 and above as i use 1.8) Slowness and teleporting
You can still push the mob around even with their slowness and no AI. Teleporting them constantly may be a bit resource intensive, particularly if you have a lot of them. What you can do is make a mob ride on an invisible armor stand. Not sure if they look like they're sitting though.