|
@@ -0,0 +1,53 @@
|
|
|
|
+package QuickVerifyCrap;
|
|
|
|
+
|
|
|
|
+import java.io.BufferedReader;
|
|
|
|
+import java.io.FileNotFoundException;
|
|
|
|
+import java.io.FileReader;
|
|
|
|
+import java.io.IOException;
|
|
|
|
+import java.util.HashMap;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
+
|
|
|
|
+public class Litemergica {
|
|
|
|
+ public static void main(String[] args) throws IOException {
|
|
|
|
+ String[] files = {"R1C1.txt","R1C2.txt","R1C3.txt","R2C1.txt","R2C2.txt","R2C3.txt","R3C1.txt","R3C2.txt","R3C3.txt"};
|
|
|
|
+ HashMap<String,Integer> counts = new HashMap<>();
|
|
|
|
+ for(String file:files)
|
|
|
|
+ {
|
|
|
|
+ String path = "C:\\dotMCMain\\MultiMC\\instances\\.19-DUP\\.minecraft\\config\\litematica\\"+file;
|
|
|
|
+ BufferedReader r = new BufferedReader(new FileReader(path));
|
|
|
|
+ String line = "";
|
|
|
|
+ for(int i=0;i<6;i++,line=r.readLine());
|
|
|
|
+ while(line !=null)
|
|
|
|
+ {
|
|
|
|
+ String[] splitt = line.split("\\|");
|
|
|
|
+ if(splitt.length<2)
|
|
|
|
+ {
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ String key = splitt[1];
|
|
|
|
+ System.out.println(line);
|
|
|
|
+ System.out.println(splitt[1]);
|
|
|
|
+ System.out.println(splitt[2]);
|
|
|
|
+ int amount = Integer.valueOf(splitt[2].trim());
|
|
|
|
+ int count = counts.getOrDefault(key,0);
|
|
|
|
+ if(amount>count)
|
|
|
|
+ {
|
|
|
|
+ counts.put(key,amount);
|
|
|
|
+ }
|
|
|
|
+ line = r.readLine();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ var list = counts.entrySet().stream().collect(Collectors.toList());
|
|
|
|
+ list.sort((e1,e2)->
|
|
|
|
+ {
|
|
|
|
+ return e2.getValue().compareTo(e1.getValue());
|
|
|
|
+ });
|
|
|
|
+ list.forEach((o->{
|
|
|
|
+ System.out.println(o.getKey()+"|"+o.getValue());
|
|
|
|
+ }));
|
|
|
|
+ }
|
|
|
|
+}
|