Been trying to get my custom mob to render holding a spear. The easiest way I've found is to extend EntitySkeleton, Override the onLivingUpdate so it doesnt burn in the day time. However, I do not want it to attack the player. I took out the AITask that involve the player, but the Mob still attacks the player. It does follow the rest of the AI task when not attacking a player though. It goes after all the other custom mobs I have it set to attack. Is it possible to get it to stop targeting the player? What file would I need to look at to get a better understanding of stopping the attacks?
Just dig deeper to find out what it is about EntitySkeleton that you can replicate. For instance, sometimes the Iron Golem holds a rose -- that is determined in the mob's class but the rose icon is handled in the Iron Golem's render class.
Sometimes the easiest way, as you found out, causes problems
No, the AI tasks should not attack the player if you have properly removed the task.
How did you remove the task? Did you clear the list and then add back what you want?
Anyway, you can debug this easily. Start by clearing all the AI. Then add back one task at a time to figure out which one is causing you trouble. Then look into that one carefully to understand why.
Thanks sky I've been poking around the golem code and the render code. I've got the custom mob to hold a block, but I cannot figure out how to get it to hold an item. I'm reading over RenderLiving code at the moment. At the very least, I should be able to make a new block with 5 clear sides and 1 side with a spear drawn on it. But give me a day or two to try to figure out how to make it hold an actual item instead of a block, if I can't figure it out, I'll be back
For now, it's bed time though, being tired doesn't help one bit lol
Been trying to get my custom mob to render holding a spear. The easiest way I've found is to extend EntitySkeleton, Override the onLivingUpdate so it doesnt burn in the day time. However, I do not want it to attack the player. I took out the AITask that involve the player, but the Mob still attacks the player. It does follow the rest of the AI task when not attacking a player though. It goes after all the other custom mobs I have it set to attack. Is it possible to get it to stop targeting the player? What file would I need to look at to get a better understanding of stopping the attacks?
Just dig deeper to find out what it is about EntitySkeleton that you can replicate. For instance, sometimes the Iron Golem holds a rose -- that is determined in the mob's class but the rose icon is handled in the Iron Golem's render class.
Sometimes the easiest way, as you found out, causes problems
in the EntitySkeleton constructor there is this:
it tell to attack the nearest player. I think (but I'm not sure that works) you have to do in your custom skeleton constructor:
sorry for my bad english I'm Italian
Tried, but didnt work, still attacks the player. Guess I may have to learn the harder way to get items rendering lol
No, the AI tasks should not attack the player if you have properly removed the task.
How did you remove the task? Did you clear the list and then add back what you want?
Anyway, you can debug this easily. Start by clearing all the AI. Then add back one task at a time to figure out which one is causing you trouble. Then look into that one carefully to understand why.
Thanks sky I've been poking around the golem code and the render code. I've got the custom mob to hold a block, but I cannot figure out how to get it to hold an item. I'm reading over RenderLiving code at the moment. At the very least, I should be able to make a new block with 5 clear sides and 1 side with a spear drawn on it. But give me a day or two to try to figure out how to make it hold an actual item instead of a block, if I can't figure it out, I'll be back
For now, it's bed time though, being tired doesn't help one bit lol
Thank both of you for the help.