Added client config. Added config option for screen text gui.
This commit is contained in:
@ -14,14 +14,34 @@ import java.util.List;
|
||||
public final class Config {
|
||||
public static final Server SERVER;
|
||||
public static final ForgeConfigSpec SERVER_SPEC;
|
||||
public static final Client CLIENT;
|
||||
public static final ForgeConfigSpec CLIENT_SPEC;
|
||||
|
||||
static {
|
||||
Pair<Server, ForgeConfigSpec> spec_pair = new ForgeConfigSpec.Builder().configure(Server::new);
|
||||
SERVER = spec_pair.getLeft();
|
||||
SERVER_SPEC = spec_pair.getRight();
|
||||
Pair<Server, ForgeConfigSpec> specPairServer = new ForgeConfigSpec.Builder().configure(Server::new);
|
||||
SERVER = specPairServer.getLeft();
|
||||
SERVER_SPEC = specPairServer.getRight();
|
||||
|
||||
Pair<Client, ForgeConfigSpec> specPairClient = new ForgeConfigSpec.Builder().configure(Client::new);
|
||||
CLIENT = specPairClient.getLeft();
|
||||
CLIENT_SPEC = specPairClient.getRight();
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, SERVER_SPEC);
|
||||
ModLoadingContext.get().registerConfig(ModConfig.Type.CLIENT, CLIENT_SPEC);
|
||||
}
|
||||
|
||||
public static class Client {
|
||||
public static ForgeConfigSpec.BooleanValue GUI_SCREEN_TEXT_ENABLED;
|
||||
|
||||
Client(ForgeConfigSpec.Builder builder) {
|
||||
builder.comment("GUI settings.").push("GUI");
|
||||
GUI_SCREEN_TEXT_ENABLED = builder
|
||||
.comment("Whether current protection status is displayed as text on screen.")
|
||||
.define("guiScreenTextEnabled", true);
|
||||
builder.pop();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Server {
|
||||
|
||||
Reference in New Issue
Block a user