SpongeAvoidEntityAIBuilder actually use EntityCreature as second argument.
Because of that you cannot actually avoid no-creature based entity like the player.
Version: SpongeVanilla 1.12-7.0.0-BETA-306
Then it should be EntityLivingBase. The player isn't an EntityLiving.
Is it able to avoid non-living entities as well?
@ryantheleach After a quick look, EntityAIAvoidEntity seems to accept Entity so yeah in theory, we can use it to be able to avoid non-living entities.
I'll be dammed.
Looks like when I originally wrote this AI interface, I brought in the filter (which is fine) but completely forgot about the target class.
So really two things can be done here (give me some thoughts). One is a break, one isn't:
Thoughts?
I don't understand the second option.
The second option wouldn't have to be a break. It could just default to Entity.class if left unspecified.
I've elected to just allow all entities to be passed to the selector due to the generics usage, changing the target class after the task has been built gets ugly fast and allowing the target class in the builder still means the predicate in the task would be just an Entity predicate (which means you would still need to cast).