mob tasks not working.

1 post / 0 new
Offline
Last seen: 1 year 2 months ago
Joined: 12/28/2014 - 14:44
Gems: 0
mob tasks not working.

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.