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
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
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
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.
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.
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.
Man, sorry guys but i am now very confused on which route to take and how to do so :/ Garris0n DreTaX maxben34 Webster56
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.
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.
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.