for ( int id : instance().newVillagerIds ) {
          if ( instance().spawnConditionHandlers.get( id ) == null )
              validVillagerIds.add( id );
          else if ( instance().spawnConditionHandlers.get( id ).typeIsValidForVillager( villager, rand ) )
              validVillagerIds.add( id );
        }

I guess it doesn't realy change much. But it's all I got. Thank you for your time.