public EntitySlime(World worldIn) { super(worldIn); this.moveHelper = new EntitySlime.SlimeMoveHelper(this); this.tasks.addTask(1, new EntitySlime.AISlimeFloat(this)); this.tasks.addTask(2, new EntitySlime.AISlimeAttack(this)); this.tasks.addTask(3, new EntitySlime.AISlimeFaceRandom(this)); this.tasks.addTask(5, new EntitySlime.AISlimeHop(this)); this.targetTasks.addTask(1, new EntityAIFindEntityNearestPlayer(this)); this.targetTasks.addTask(3, new EntityAIFindEntityNearest(this, EntityIronGolem.class)); }
protected void initEntityAI() { this.tasks.addTask(1, new EntitySlime.AISlimeFloat(this)); this.tasks.addTask(2, new EntitySlime.AISlimeAttack(this)); this.tasks.addTask(3, new EntitySlime.AISlimeFaceRandom(this)); this.tasks.addTask(5, new EntitySlime.AISlimeHop(this)); this.targetTasks.addTask(1, new EntityAIFindEntityNearestPlayer(this)); this.targetTasks.addTask(3, new EntityAIFindEntityNearest(this, EntityIronGolem.class)); }
@Override protected void initEntityAI() { this.tasks.addTask(1, new EntitySentry.AISlimeFloat(this)); this.tasks.addTask(2, new EntitySentry.AISlimeAttack(this)); this.tasks.addTask(3, new EntitySentry.AISlimeFaceRandom(this)); this.tasks.addTask(5, new EntitySentry.AISlimeHop(this)); this.targetTasks.addTask(1, new EntityAIFindEntityNearestPlayer(this)); this.targetTasks.addTask(3, new EntityAIFindEntityNearest(this, EntityIronGolem.class)); }
@Override public AIFindEntityNearest newAIFindEntityNearest(EntityLiving entityLiving, Class<? extends Entity> entityClass) { return (AIFindEntityNearest) new EntityAIFindEntityNearest( (net.minecraft.entity.EntityLiving) entityLiving, (Class<? extends EntityLivingBase>) entityClass ); }