Aggressive chicken?

Discussion in 'Plugin Development' started by Metal Julien, Jun 11, 2013.

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

    Metal Julien

    Hi, I want to make chickens attacking Player, exact same behavior as Zombies etc. How do you do that? If it's very difficult, does anyone know an already written plugin for that?

    Thanks!
     
  2. Offline

    adam753

    You can make anything attack anything by doing mob.setTarget(other_mob). So in your case, myChicken.setTarget(myPlayer).

    Ah, but programming the actual behaviour of zombies might be a bit more difficult. You could just setTarget when the player is in range I suppose.
     
  3. Offline

    Metal Julien

    adam753 Nop, the setTarget doesn't work at all, not if I just do it once, not if I Loop it, not if I stand 1 block away from it and not if I do it with 10...
     
  4. Offline

    chasechocolate

    Metal Julien you might have to create a class that extends the EntityChicken class (from NMS) and give it properties/goal selectors that will make it target nearby players.
     
  5. Offline

    Metal Julien

  6. Offline

    Garris0n

    I think you could use the RemoteEntities library to replace the AI of the Chicken with that of a Zombie, but I'm not positive.
     
Thread Status:
Not open for further replies.

Share This Page