-
-
Notifications
You must be signed in to change notification settings - Fork 100
Expand file tree
/
Copy pathAPIConfig.java
More file actions
51 lines (40 loc) · 2.11 KB
/
APIConfig.java
File metadata and controls
51 lines (40 loc) · 2.11 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
package de.srendi.advancedperipherals.common.configuration;
import net.minecraftforge.common.ForgeConfigSpec;
import net.minecraftforge.fml.config.ModConfig;
public class APIConfig implements IAPConfig {
//Entity
public final ForgeConfigSpec.BooleanValue enableEntityAPI;
public final ForgeConfigSpec.BooleanValue enableGetNBT;
public final ForgeConfigSpec.BooleanValue enableGetBoundingBox;
public final ForgeConfigSpec.BooleanValue enableGetPos;
public final ForgeConfigSpec.BooleanValue enableGetData;
public final ForgeConfigSpec.BooleanValue enableGetPersistentData;
public final ForgeConfigSpec.BooleanValue enablePlayerAccess;
private final ForgeConfigSpec configSpec;
public APIConfig() {
ForgeConfigSpec.Builder builder = new ForgeConfigSpec.Builder();
builder.comment("APIs config").push("APIs");
builder.push("entity");
enableEntityAPI = builder.comment("Enables the \"entity\" API").define("enableEntityAPI", true);
enableGetNBT = builder.comment("Activates the \"getNBT\" function of the entity API").define("enableGetNBT", true);
enableGetBoundingBox = builder.comment("Activates the \"getBoundingBox\" function of the entity API").define("enableGetBoundingBox", true);
enableGetPos = builder.comment("Activates the \"getPos\" function of the entity API").define("enableGetPos", true);
enableGetData = builder.comment("Activates the \"getData\" function of the entity API").define("enableGetData", true);
enableGetPersistentData = builder.comment("Activates the \"getPersistentData\" function of the entity API").define("enableGetPersistentData", true);
enablePlayerAccess = builder.comment("Allows player entities to be used with the EntityAPI.").define("enablePlayerAccess", true);
builder.pop();
configSpec = builder.build();
}
@Override
public ForgeConfigSpec getConfigSpec() {
return configSpec;
}
@Override
public String getFileName() {
return "APIs";
}
@Override
public ModConfig.Type getType() {
return ModConfig.Type.COMMON;
}
}