use of pneumaticCraft.common.ai.StringFilterEntitySelector in project PneumaticCraft by MineMaarten.
the class ProgWidgetAreaItemBase method isEntityValid.
public static boolean isEntityValid(Entity entity, IProgWidget widget) {
StringFilterEntitySelector whitelistFilter = getEntityFilter((ProgWidgetString) widget.getConnectedParameters()[1], true);
StringFilterEntitySelector blacklistFilter = getEntityFilter((ProgWidgetString) widget.getConnectedParameters()[widget.getParameters().length + 1], false);
return whitelistFilter.isEntityApplicable(entity) && !blacklistFilter.isEntityApplicable(entity);
}
use of pneumaticCraft.common.ai.StringFilterEntitySelector in project PneumaticCraft by MineMaarten.
the class ProgWidgetAreaItemBase method getValidEntities.
public static List<Entity> getValidEntities(World world, IProgWidget widget) {
StringFilterEntitySelector whitelistFilter = getEntityFilter((ProgWidgetString) widget.getConnectedParameters()[1], true);
StringFilterEntitySelector blacklistFilter = getEntityFilter((ProgWidgetString) widget.getConnectedParameters()[widget.getParameters().length + 1], false);
return getEntitiesInArea((ProgWidgetArea) widget.getConnectedParameters()[0], (ProgWidgetArea) widget.getConnectedParameters()[widget.getParameters().length], world, whitelistFilter, blacklistFilter);
}
Aggregations