diff --git a/src/engine/ConfigParsing/EffectsParser.java b/src/engine/ConfigParsing/EffectsParser.java index 162a5a50..e056eb7f 100644 --- a/src/engine/ConfigParsing/EffectsParser.java +++ b/src/engine/ConfigParsing/EffectsParser.java @@ -20,7 +20,7 @@ import java.util.ArrayList; import java.util.List; public class EffectsParser { - public static String EffectsPath = ConfigManager.DEFAULT_DATA_DIR + "Effects.cfg"; + public static String EffectsPath = ConfigManager.DEFAULT_DATA_DIR + "wpak/Effects.cfg"; public static void init() throws IOException { ArrayList> compiledData = new ArrayList<>(); String[] lines = readLines(EffectsPath); @@ -42,19 +42,15 @@ public class EffectsParser { CreateBlocks(compiledData); } public static String[] readLines(String filename) throws IOException { - File effectsCfg = new File("/home/mbdev/mb_dev/mb.data/Effects.cfg"); - return effectsCfg.list(); - - - //FileReader fileReader = new FileReader(filename); - //BufferedReader bufferedReader = new BufferedReader(fileReader); - //List lines = new ArrayList<>(); - // String line; - //while ((line = bufferedReader.readLine()) != null) { - // lines.add(line); - //} - //bufferedReader.close(); - //return lines.toArray(new String[0]); + FileReader fileReader = new FileReader(filename); + BufferedReader bufferedReader = new BufferedReader(fileReader); + List lines = new ArrayList<>(); + String line; + while ((line = bufferedReader.readLine()) != null) { + lines.add(line); + } + bufferedReader.close(); + return lines.toArray(new String[0]); } public static void CreateBlocks(ArrayList> compiledData) {