Freeze a mob

Discussion in 'Plugin Development' started by OracleTarget, Nov 22, 2013.

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

    OracleTarget

    Hey guys,

    I've got another question for you. How do I freeze a mob and make it not attack while standing still?
    for example a skeleton shooting with his bow.

    Hope you got it!

    Thanks
     
  2. Offline

    Chinwe

    You could give the mob a slowness potion effect, though if you don't want the potion bubbles/effects you could use a scheduler/BukkitRunnable to teleport it to the same location every few ticks.
    To stop the attacking, cancel every EntityTargetEvent that concerns it targeting someone :)
     
  3. Offline

    DarkBladee12

    OracleTarget Chinwe Using the potion effect is the best solution and you can disable the potion swirling effects by making the potion effect ambient ;)
     
  4. Offline

    fls1234

    Code:java
    1. zombie.addpotioneffect(new PotionEffect(PotionEffectType.SLOWNESS, How Many Ticks, 123456789)

    You can use that, but you will need to get the zombie you wanna effect.
     
  5. Offline

    PogoStick29

    EntityMoveEvent?
     
  6. Offline

    Chinwe

    Doesn't exist, can you imagine how many times it would fire for every entity in every world? Mobs, dropped items, minecarts, xp orbs, arrows etc :confused:
     
  7. Offline

    PogoStick29

    LivingEntityMoveEvent?!?
     
  8. Offline

    xTrollxDudex

    PogoStick29
    Nope. Not a good idea.
     
    PogoStick29 likes this.
Thread Status:
Not open for further replies.

Share This Page