Files
refinedstorage/src/main/java/storagecraft/tile/ImporterMode.java
2015-12-19 00:02:44 +01:00

32 lines
477 B
Java

package storagecraft.tile;
public enum ImporterMode {
WHITELIST(0), BLACKLIST(1);
public final int id;
ImporterMode(int id) {
this.id = id;
}
public ImporterMode next() {
ImporterMode next = getById(id + 1);
if (next == null) {
return getById(0);
}
return next;
}
public static ImporterMode getById(int id) {
for (ImporterMode mode : values()) {
if (mode.id == id) {
return mode;
}
}
return null;
}
}