mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-17 19:15:13 +00:00
Unified build script (#175)
* Update build script * Update build script to import fix for shadow in dev and sources artifacts * Update fixed build script to shadow csv dependency in dev jar as well * Moved jitpack * Move new files
This commit is contained in:
1 parent
43b71b1de6
commit
a7ca6c8527
188 files changed
+646
-968
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package codechicken.nei.config;
|
||||
|
||||
import java.util.LinkedList;
|
||||
|
||||
public abstract class ArrayDumper<T> extends DataDumper
|
||||
{
|
||||
public ArrayDumper(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterable<String[]> dump(int mode) {
|
||||
LinkedList<String[]> list = new LinkedList<>();
|
||||
T[] array = array();
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
T obj = array[i];
|
||||
if (obj == null) {
|
||||
if (mode == 1 || mode == 2)
|
||||
list.add(new String[]{Integer.toString(i), null, null, null, null});
|
||||
} else {
|
||||
if (mode == 0 || mode == 2)
|
||||
list.add(dump(obj, i));
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public abstract T[] array();
|
||||
|
||||
public abstract String[] dump(T obj, int id);
|
||||
}
|
||||
Reference in new issue
Block a user