mob tasks not working.

Started by zacster129 on Sun, 12/28/2014 - 18:30
Last seen on 16:19, 20. May 2016
Joined Dec 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
mob tasks not working.
Sun, 12/28/2014 - 18:30

I am trying to make a character attack certain mobs, but he not doing anything! :/ I loads up with out errors, but I dosn't attack the mobs.

this.targetTasks.addTask(10, new EntityAINearestAttackableTarget(this, EntityCow.class, 8, true));
this.targetTasks.addTask(11, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(10, new EntityAINearestAttackableTarget(this, EntityChicken.class, 8, true));
this.targetTasks.addTask(11, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(10, new EntityAINearestAttackableTarget(this, EntityPig.class, 8, true));
this.targetTasks.addTask(11, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(10, new EntityAINearestAttackableTarget(this, EntitySheep.class, 8, true));
this.targetTasks.addTask(10, new EntityAIHurtByTarget(this, false));
this.tasks.addTask(10, new EntityAIPanic(this, 1.2D));
this.tasks.addTask(10, new EntityAIAvoidEntity(this, EntityCreeper.class, 8, 1.2D, 1.2D));
this.tasks.addTask(10, new EntityAIAvoidEntity(this, EntityEnderman.class, 8, 1.2D, 1.2D));
this.tasks.addTask(10, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, true));
this.tasks.addTask(10, new EntityAISwimming(this));
this.tasks.addTask(10, new EntityAIWander(this, 0.8D));
this.tasks.addTask(10, new EntityAILookIdle(this));

this.targetTasks.addTask(10, new EntityAINearestAttackableTarget(this, EntityZombie.class, 8, true));
this.targetTasks.addTask(11, new EntityAIHurtByTarget(this, true));
this.targetTasks.addTask(10, new EntityAINearestAttackableTarget(this, mcreator_adventurer.Entityadventurer.class, 8, true));
this.targetTasks.addTask(11, new EntityAIHurtByTarget(this, true));

If you need all of it, I'll post it.