-
-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathAPAddon.java
More file actions
59 lines (48 loc) · 1.38 KB
/
Copy pathAPAddon.java
File metadata and controls
59 lines (48 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
package de.srendi.advancedperipherals.common.addons;
import net.neoforged.fml.ModList;
import java.util.Arrays;
public enum APAddon {
AE2("ae2"),
AE2THINGS("ae2things"),
APP_MEKANISTICS("appmek"),
CREATE("create"),
CURIOS("curios"),
DIMSTORAGE("dimstorage"),
MEKANISM("mekanism"),
MINECOLONIES("minecolonies"),
PATCHOULI("patchouli"),
POWAH("powah"),
REFINEDSTORAGE("refinedstorage"),
REFINEDSTORAGE_MEKANISM("refinedstorage_mekanism_integration"),
SABLE("sable");
private final String modId;
private boolean loaded;
APAddon(String modId) {
this.modId = modId;
this.loaded = false; // Default to false will be updated by setup()
}
public String getModId() {
return modId;
}
public boolean isLoaded() {
return loaded;
}
public static void setup() {
ModList modList = ModList.get();
for (APAddon addon : values()) {
addon.loaded = modList.isLoaded(addon.getModId());
}
}
public static String[] getAllModIds() {
return Arrays.stream(values())
.map(APAddon::getModId)
.toArray(String[]::new);
}
/*
public static boolean isBlockOnShip(Level level, BlockPos pos) {
if (!vs2Loaded) {
return false;
}
return ValkyrienSkies.isBlockOnShip(level, pos);
}*/
}