public static URL getResource ( 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 ) { break ; } } if ( url == null ) { throw new RuntimeException ( "Resource not found: " + ref ) ; } return url ; }
Get a resource as a URL