Hostile sheep

Discussion in 'Plugin Development' started by Suyguy, Dec 3, 2013.

?

Is it possible to change the skin on hit as well?

  1. Yes

    0 vote(s)
    0.0%
  2. No

    50.0%
  3. Depends

    16.7%
  4. Only in certain ways

    16.7%
  5. Easy as shit, cause im a boss programmer

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

    Suyguy

    Hello world!!! I need somehelp programming a sheep to turn hostile, upon hit from a player. Any one that can help please do, i am a newbie, and i can't really think of a way for this to work. Maybe check if the mob is a sheep, and make sure the damage source is player, and when this occurs the Sheep turns hostile because both these cases are true. Any help is nice. Maybe put in "// (Explain this codding" Thanks guys in advance
     
  2. You need to write an AI for that. Skin can be changed with spout. I just wrote a bigger plugin with AI called UnleashTheKraken, so i have exp with it and i can help you in private
     
  3. Offline

    Suyguy

    DreTaX Awesome i would love to get some help, but i was reading somewhere that the sheep being hostile would only make it look at you, so i made an different idea, which is basically the sheep finds Player player, and then his location, it walks to he location, (constantly) and then deal 2.0d to it (1 heart) of damage once its 1/2 block away. But i might be wrong, so once again, i would like some 1v1 help
     
  4. Offline

    Webster56

    The sheep should be charging, so you might want to throw the player a bit away from the sheep
     
  5. Offline

    Garris0n

    You don't exactly need to write an AI, just code a custom entity extending EntitySheep and give it, say, the Zombie's AI. I suppose some modifications may be required to fit the desired functionality, though.
     
  6. Offline

    maxben34

    Listen to Garris0n but also check to see if a player is in a certain radius of that entity if he is deal damage to the player. That will give a hitting effect.
     
  7. Offline

    Garris0n

    If the nms is too advanced for you to use just yet, you might want to look into RemoteEntities, though it is currently only partially updated to 1.7.2.
     
  8. I always like writing a custom AI. Much better
     
  9. Offline

    Garris0n

    Not every body knows how, and for some it's too advanced for them to do just yet.
     
  10. ???
     
  11. Offline

    Garris0n

    ????
     
  12. Offline

    Suyguy

  13. Offline

    Garris0n

    The easiest would be to use RemoteEntities, at least when it's fully updated. The hardest would be to create a custom entity and write your own AI for it.
     
  14. Offline

    Suyguy

    What about
    ? Would that not be better or easier?
     
  15. Offline

    Garris0n

    You still have to know how to create custom entities and write some changes to the AI of the zombie...either way using RemoteEntities would be the easiest approach.
     
  16. Offline

    Suyguy

    Garris0n Ok i looked it over, and i saw it, but i still don't understand how the sheep will turn hostile? Unless "DesireAttackNearest" works for sheep as well.
     
Thread Status:
Not open for further replies.

Share This Page