Robertusxd Posted October 29, 2017 Posted October 29, 2017 (edited) So my problem is that my Entity does not attack. Its not just dealing no damage it does not even move towards the target or do anything at all really. Entity: https://pastebin.com/d9dAzjM0 EntityNeutral: https://pastebin.com/R2R1Raqx WalkHomeAi: https://pastebin.com/1ECiWBsD AttackAI: https://pastebin.com/08Xvq8tt But i dont think it is a problem with my AI since i also tried Minecrafts AIs EntityAIHurtByTarget and EntityAINearestAttackableTarget and they didnt work either. I also used System.out.println to see if the setattacktarget method of my entity is called and it does get called. Edited October 29, 2017 by Robertusxd Quote
Robertusxd Posted October 29, 2017 Author Posted October 29, 2017 15 minutes ago, Dustpuppy said: Try to set attrib Attack_Speed i tried it but it didnt change anything Quote
Ugdhar Posted October 29, 2017 Posted October 29, 2017 You're in survival mode right? I know I added a mob tinkering around one time, and it didn't do much because I was in creative mode. After I switched it to SV, the 20 or so mobs I had spawned all bumrushed me at once. . . Quote
Robertusxd Posted October 29, 2017 Author Posted October 29, 2017 32 minutes ago, Ugdhar said: You're in survival mode right? I know I added a mob tinkering around one time, and it didn't do much because I was in creative mode. After I switched it to SV, the 20 or so mobs I had spawned all bumrushed me at once. . . yes im in survival mode as i said the setAttackTarget method of the entity gets called but the entity does not react to it. Quote
jabelar Posted October 30, 2017 Posted October 30, 2017 You never seem to set any actual attack AI. The targeting AI just sets the target but doesn't do any movement or attack. You need something like EntityAIAttackMelee() also added to the tasks list. In other words, the targeting and the actual attack are meant to be separate AI and if you want the entity to move towards the target you need to add that AI as well. 2 Quote Check out my tutorials here: http://jabelarminecraft.blogspot.com/
Robertusxd Posted October 30, 2017 Author Posted October 30, 2017 7 hours ago, jabelar said: You never seem to set any actual attack AI. The targeting AI just sets the target but doesn't do any movement or attack. You need something like EntityAIAttackMelee() also added to the tasks list. In other words, the targeting and the actual attack are meant to be separate AI and if you want the entity to move towards the target you need to add that AI as well. you are my hero right now, thank you so much Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.