code: public static boolean resourceExists(String ref) {
  		URL url = null;
  		
  		for (int i=0;i<locations.size();i++) {
  			ResourceLocation location = (ResourceLocation) locations.get(i);
  			url = location.getResource(ref);
  			if (url != null) {
  				return true;
  			}
  		}
  		
  		return false;
  	}
docs: Check if a resource is available from any given resource loader
  
  @param ref A reference to the resource that should be checked
  @return True if the resource can be located