package me.xdrop.jrand.data;

import java.io.*;
import java.util.ArrayList;
import java.util.List;

public class AssetLoader {
    public List<String> loadAsset(String assetName) {
        ClassLoader classLoader = getClass().getClassLoader();
        File file = new File(classLoader.getResource(assetName).getFile());
        List<String> list = new ArrayList<>();
        reverse(list);
        try {
            BufferedReader reader = new BufferedReader(new FileReader(file));
            while(reader.ready()) {
                list.add(reader.readLine());
            }

        } catch (IOException e) {
           return new ArrayList<>();
        }
        return list;
    }

    public static void reverse(List<?> list) { rev(list); }
    private static <T> void rev(List<T> list) {
        List<T> tmp = new ArrayList<T>(list);
        for (int i = 0; i < list.size(); i++) {
            list.set(i, tmp.get(list.size() - i - 1));
        }
    }

}

@@ -57,22 +57,73 @@
 ava.
-util.ArrayList
+net.URL;%0Aimport java.util.ArrayList;%0Aimport java.util.Collections
 ;%0Aim
@@ -300,29 +300,23 @@
     
-File
+URL
  file
- = new File(
+name = 
 clas
@@ -345,16 +345,119 @@
 setName)
+;%0A%0A        if (filename == null) return Collections.emptyList();%0A%0A        File file = new File(filename
 .getFile
@@ -512,31 +512,8 @@
 ();%0A
-        reverse(list);%0A
     
@@ -801,24 +801,24 @@
 ist;%0A    %7D%0A%0A
-
     public s
@@ -865,16 +865,17 @@
 ist); %7D%0A
+%0A
     priv

Update asset loader