I'm trying to make a mob (extends EntityMob) and am basically copying tasks from existing mobs, but EntityAINearestAttackableTarget is giving me warnings that it's generic.
This is the default code, in any given mob class with a big yellow underline in Eclipse:
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityVillager.class, false));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget(this, EntityIronGolem.class, true));
Yet if I apply the suggested fix, it doesn't show a warning:
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget<EntityPlayer>(this, EntityPlayer.class, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget<EntityVillager>(this, EntityVillager.class, false));
this.targetTasks.addTask(3, new EntityAINearestAttackableTarget<EntityIronGolem>(this, EntityIronGolem.class, true));
My question is, why? Why does it give me a warning if it's the Vanilla code that obviously works?
Is it going to be problematic if I ignore the warning? Or if I fix the warning?