"Freeze" a mob

Discussion in 'Plugin Development' started by mttprvst13, Mar 4, 2016.

Thread Status:
Not open for further replies.
  1. Offline


    Hey there. I am making a plugin where I am using a villager. I need the villager to be still. I have got the code the set his speed really slow:
    villager.addPotionEffect(new PotionEffect(PotionEffectType.SLOW, 1000000000, 255, false, false));
    but when I get in-game and try to use my other command to delete him, it does not work. My command requires the villager in the same spot as the player, but when ever I walk up to the villager he starts being pushed by me. I am looking for something like:
    but I understand that it can be a little complicated. Any suggestions?

    Thank you for your time! :D
  2. Offline


    @mttprvst13 It requires NMS to spawn unmovable entities.
  3. Offline


    NMS, use it to set AI to 1.

    Disabling AI disables it from moving to i believe, dont quote me incase im wrong lol.
Thread Status:
Not open for further replies.

Share This Page