Info
This is:
Your issue / suggestion
Methods canTarget() and targetOption() don't working.I created new zombie class with overrided these methods and zombie want not to attack villagers.
Code;
@Override
public boolean canTarget(Entity entity) {
return entity instanceof Villager || entity instanceof Player;
}
@Override
public boolean targetOption(EntityCreature creature, double distance) {
if(distance > 100D || creature.isClosed() || !creature.isAlive()) return false;
return creature instanceof Villager || (creature instanceof Player && !((Player) creature).isCreative());
}