Config File

Версия Minecraft
1.12.2
148
2
6
И так, я создал конфиг
Код:
import java.io.File;

import com.hesperus_rus.complicatedvanillacraftingrecipes.CVCRInformation;

import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class CVCRConfig {
    public static final String Complicated_Vanilla_Crafting_Recipes_CATEGORY = "complicated vanilla crafting recipes";
    public static final String DEFAULT_ENCODING = "UTF-8";

    public static Configuration config;

    public static int GUI_CLAY_FURNACE_ID = 1;
    public static int ClayFurnaceCookTime = 800;

    public static boolean canShowUpdates = false;

    public static void loadConfig(File configFile) {
        config = new Configuration(configFile);
        config.load();
        load();
    }

    public static void load() {
        String desc;

        desc = "GUI IDs";
        config.addCustomCategoryComment(desc, "Set the ID's for the GUI's to ensure that they don't clash with other mod's id's");
        GUI_CLAY_FURNACE_ID = config.getInt("GUI_CLAY_FURNACE_ID", desc, 1, 1, 100, "Set the ID for the Clay Furnace");

        desc = "Clay Furnace Burning Time";
        config.addCustomCategoryComment(desc, "Set your need value");
        ClayFurnaceCookTime = config.getInt("ClayFurnaceCookTime", "Clay Furnace", 800, 200, 1200, "");

        desc = "Version checking of the CVCR";
        config.addCustomCategoryComment(desc, "Show Updates for Complicated Vanilla Crafting Recipes");
        canShowUpdates = config.getBoolean("Show Updates", "Version checking of the CVCR", false, "If true, Complicated Vanilla Crafting Recipes will be displayed available updates in Minecraft. If false, Complicated Vanilla Crafting Recipes not will be checking available updates and display in the chat.", desc);
        if(config.hasChanged()) {
            config.save();
        }
    }

    @Mod.EventBusSubscriber(modid = CVCRInformation.MOD_ID)
    public static class ChangeListener {
        @SubscribeEvent
        public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
            if(eventArgs.getModID().equals(CVCRInformation.MOD_ID))
                load();
        }
    }
}
Код:
public static File config;

@Mod.EventHandler
    public void preInit(FMLPreInitializationEvent e) {
        e.getModMetadata().version = CVCRInformation.MOD_VERSION;
        CVCRConfig.loadConfig(e.getSuggestedConfigurationFile());
        LOGGER = e.getModLog();
        proxy.preInit(e);
    }
И он у меня не отображается в моде, может я что-то не так сделал?
 
Решение
Либо делаешь свой конфиг на аннотациях. После делается авто конфиг, если через аннотации.
@Config на класс, и на методы его под классы.

Либо делаешь свою реализацию конфиг гуи, после указываешь путь до класса в Mod ->guiFactory.
Загуглить.
148
2
6
Что ещё мне нужно сделать?
 
3,005
192
592
Либо делаешь свой конфиг на аннотациях. После делается авто конфиг, если через аннотации.
@Config на класс, и на методы его под классы.

Либо делаешь свою реализацию конфиг гуи, после указываешь путь до класса в Mod ->guiFactory.
Загуглить.
 
7,099
324
1,510
148
2
6
Про аннотацию я знаю
 
148
2
6
@Doc Спасибо, теперь кнопка Config успешно отображается :)
 
148
2
6
Код:
[19:41:36] [main/ERROR] [FML]: An error occurred trying to load a config for com.hesperus_rus.config.CVCRConfig into java.lang.RuntimeException: Error syncing field 'CATEGORY_COMPLICATED' of class 'com.hesperus_rus.config.CVCRConfig'!
[19:41:36] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ----
// Surprise! Haha. Well, this is awkward.

Time: 6/11/19 7:41 PM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderException: java.lang.RuntimeException: Error syncing field 'CATEGORY_COMPLICATED' of class 'com.hesperus_rus.config.CVCRConfig'!
    at net.minecraftforge.common.config.ConfigManager.sync(ConfigManager.java:191)
    at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:602)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135)
    at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:593)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)
    at net.minecraft.client.Minecraft.init(Minecraft.java:513)
    at net.minecraft.client.Minecraft.run(Minecraft.java:421)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)
Caused by: java.lang.RuntimeException: Error syncing field 'CATEGORY_COMPLICATED' of class 'com.hesperus_rus.config.CVCRConfig'!
    at net.minecraftforge.common.config.ConfigManager.sync(ConfigManager.java:306)
    at net.minecraftforge.common.config.ConfigManager.sync(ConfigManager.java:183)
    ... 43 more
Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException: Can not set static final java.lang.String field com.hesperus_rus.config.CVCRConfig.CATEGORY_COMPLICATED to java.lang.String
    at net.minecraftforge.common.config.FieldWrapper$PrimitiveWrapper.setValue(FieldWrapper.java:318)
    at net.minecraftforge.common.config.ConfigManager.sync(ConfigManager.java:294)
    ... 44 more
Caused by: java.lang.IllegalAccessException: Can not set static final java.lang.String field com.hesperus_rus.config.CVCRConfig.CATEGORY_COMPLICATED to java.lang.String
    at sun.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:76)
    at sun.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:80)
    at sun.reflect.UnsafeQualifiedStaticObjectFieldAccessorImpl.set(UnsafeQualifiedStaticObjectFieldAccessorImpl.java:77)
    at java.lang.reflect.Field.set(Field.java:764)
    at net.minecraftforge.common.config.FieldWrapper$PrimitiveWrapper.setValue(FieldWrapper.java:314)
    ... 45 more
Я не понимаю, откуда она вылезает? То, что не может выставить static final в категории!!
 
3,005
192
592
У тебя final переменная. Ето наверное нельзя делать? :SCREAM:
А так же всегда предоставляй код к ошибки, а то гадать, даже на краше не особо кому хочется.
 
148
2
6
Спасибо, Final был лишним, но у меня теперь проблема с этим: ScreenShot_20190612010317.jpeg
И всё равно та-же проблема
Java:
[01:07:30] [main/ERROR] [FML]: An error occurred trying to load a config for com.hesperus_rus.config.CVCRConfig into java.lang.RuntimeException: Error syncing field 'CATEGORY_GENERAL' of class 'net.minecraftforge.common.config.Configuration'!
[01:07:30] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ----
// Why is it breaking :(

Time: 6/12/19 1:07 AM
Description: There was a severe problem during mod loading that has caused the game to fail

net.minecraftforge.fml.common.LoaderException: java.lang.RuntimeException: Error syncing field 'CATEGORY_GENERAL' of class 'net.minecraftforge.common.config.Configuration'!
    at net.minecraftforge.common.config.ConfigManager.sync(ConfigManager.java:191)
    at net.minecraftforge.fml.common.FMLModContainer.constructMod(FMLModContainer.java:602)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.sendEventToModContainer(LoadController.java:218)
    at net.minecraftforge.fml.common.LoadController.propogateStateMessage(LoadController.java:196)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.google.common.eventbus.Subscriber.invokeSubscriberMethod(Subscriber.java:91)
    at com.google.common.eventbus.Subscriber$SynchronizedSubscriber.invokeSubscriberMethod(Subscriber.java:150)
    at com.google.common.eventbus.Subscriber$1.run(Subscriber.java:76)
    at com.google.common.util.concurrent.MoreExecutors$DirectExecutor.execute(MoreExecutors.java:399)
    at com.google.common.eventbus.Subscriber.dispatchEvent(Subscriber.java:71)
    at com.google.common.eventbus.Dispatcher$PerThreadQueuedDispatcher.dispatch(Dispatcher.java:116)
    at com.google.common.eventbus.EventBus.post(EventBus.java:217)
    at net.minecraftforge.fml.common.LoadController.distributeStateMessage(LoadController.java:135)
    at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:593)
    at net.minecraftforge.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:232)
    at net.minecraft.client.Minecraft.init(Minecraft.java:513)
    at net.minecraft.client.Minecraft.run(Minecraft.java:421)
    at net.minecraft.client.main.Main.main(Main.java:118)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97)
    at GradleStart.main(GradleStart.java:25)
Caused by: java.lang.RuntimeException: Error syncing field 'CATEGORY_GENERAL' of class 'net.minecraftforge.common.config.Configuration'!
    at net.minecraftforge.common.config.ConfigManager.sync(ConfigManager.java:306)
    at net.minecraftforge.common.config.ConfigManager.sync(ConfigManager.java:329)
    at net.minecraftforge.common.config.ConfigManager.sync(ConfigManager.java:183)
    ... 43 more
Caused by: java.lang.RuntimeException: java.lang.IllegalAccessException: Can not set static final java.lang.String field net.minecraftforge.common.config.Configuration.CATEGORY_GENERAL to java.lang.String
    at net.minecraftforge.common.config.FieldWrapper$PrimitiveWrapper.setValue(FieldWrapper.java:318)
    at net.minecraftforge.common.config.ConfigManager.sync(ConfigManager.java:294)
    ... 45 more
Caused by: java.lang.IllegalAccessException: Can not set static final java.lang.String field net.minecraftforge.common.config.Configuration.CATEGORY_GENERAL to java.lang.String
    at sun.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:76)
    at sun.reflect.UnsafeFieldAccessorImpl.throwFinalFieldIllegalAccessException(UnsafeFieldAccessorImpl.java:80)
    at sun.reflect.UnsafeQualifiedStaticObjectFieldAccessorImpl.set(UnsafeQualifiedStaticObjectFieldAccessorImpl.java:77)
    at java.lang.reflect.Field.set(Field.java:764)
    at net.minecraftforge.common.config.FieldWrapper$PrimitiveWrapper.setValue(FieldWrapper.java:314)
    ... 46 more
Сам код:
Java:
import java.io.File;

import com.hesperus_rus.complicatedvanillacraftingrecipes.CVCRInformation;

import net.minecraftforge.common.config.Config;
import net.minecraftforge.common.config.ConfigManager;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

@Config(modid = CVCRInformation.MOD_ID)
public class CVCRConfig {
    public static final String DEFAULT_ENCODING = "UTF-8";
    public static Configuration configuration;
    
    @Config.Ignore
    public static String CATEGORY_COMPLICATED = "complicated";
    
    public static int GUI_CLAY_FURNACE = 0;
    public static int ClayFurnaceCookTime = 1000;
    public static boolean canShowUpdates = false;

    public static void loadConfiguration(File configurationFile) {
        configuration = new Configuration(configurationFile);
        configuration.load();
    }

    public static void load() {
    String desc;
    
    desc = "GUI ID";
    configuration.addCustomCategoryComment(desc, "Set the ID's for the GUI's to ensure that they don't clash with other mod's id's");
    GUI_CLAY_FURNACE = configuration.getInt("Clay Furnace GUI ID", desc, 0, 0, 100, "Set the ID for the Clay Furnace");
        
    desc = "Clay Furnace Burning Time";
    configuration.addCustomCategoryComment(desc, "Set your need value");
    ClayFurnaceCookTime = configuration.getInt("ClayFurnaceCookTime", "desc", 1000, 400, 1600, "Increased Cook Time");
        
    desc = "Version checking of the CVCR";
    configuration.addCustomCategoryComment(desc, "Show Updates for Complicated Vanilla Crafting Recipes");
    canShowUpdates = configuration.getBoolean("Show Updates", "Version checking of the CVCR", false, "If true, Complicated Vanilla Crafting Recipes will be displayed available updates in Minecraft. If false, Complicated Vanilla Crafting Recipes not will be checking available updates and display in the chat.", desc);
    if(configuration.hasChanged()) {
        configuration.save();
    }
}

    @Mod.EventBusSubscriber(modid = CVCRInformation.MOD_ID)
    public static class ChangeListener {
        @SubscribeEvent
        public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
            if(eventArgs.getModID().equals(CVCRInformation.MOD_ID))
                ConfigManager.sync(CVCRInformation.MOD_ID, Config.Type.INSTANCE);
            load();
        }
    }
}
 
Последнее редактирование:
148
2
6
Не задавай глупых вопросов, или ты про другое?
 
3,005
192
592
Тебе нужно выбрать что-то ОДНО.
ЛИБО @Config
ЛИБО Configuration

Это 2 РАЗНЫЕ вещи.
 
148
2
6
Всё равно, он не показывает содержимого в конфиге
 
148
2
6
Код:
package com.hesperus_rus.complicatedvanillacraftingrecipes.proxy;

import java.util.Set;

import com.hesperus_rus.config.CVCRConfig;
import com.hesperus_rus.guiconfig.CVCRGuiConfig;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.fml.client.IModGuiFactory;

public class GuiFactory extends CVCRConfig implements IModGuiFactory {
    @Override
    public void initialize(Minecraft minecraftInstance) {}

    @Override
    public boolean hasConfigGui() {
        return true;
    }

    @Override
    public GuiScreen createConfigGui(GuiScreen parentScreen) {
        return new CVCRGuiConfig(parentScreen);
    }

    @Override
    public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
        return null;
    }
}
Код:
package com.hesperus_rus.guiconfig;

import com.hesperus_rus.complicatedvanillacraftingrecipes.CVCRInformation;
import com.hesperus_rus.config.CVCRConfig;

import net.minecraft.client.gui.GuiScreen;
import net.minecraftforge.common.config.ConfigElement;
import net.minecraftforge.fml.client.config.GuiConfig;

public class CVCRGuiConfig extends GuiConfig {
    public CVCRGuiConfig(GuiScreen parentScreen) {
        super(parentScreen, new ConfigElement(CVCRConfig.configuration.getCategory(CVCRConfig.CATEGORY)).getChildElements(), CVCRInformation.MOD_ID, false, false, GuiConfig.getAbridgedConfigPath(CVCRConfig.configuration.toString()));
    }
}
Java:
package com.hesperus_rus.config;

import java.io.File;

import com.hesperus_rus.complicatedvanillacraftingrecipes.CVCRInformation;
import net.minecraftforge.common.config.Config;
import net.minecraftforge.common.config.ConfigManager;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.client.event.ConfigChangedEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class CVCRConfig {
    public static Configuration configuration;
    public static final String CATEGORY = "Complicated";
    
    public static int GUI_CLAY_FURNACE = 0;
    public static int ClayFurnaceCookTime = 1000;
    public static boolean canShowUpdates = false;

    public static void loadConfiguration(File configurationFile) {
        configuration = new Configuration(configurationFile);
        configuration.load();
    }

    public static void load() {
    String desc;
    
    desc = "GUI ID";
    configuration.addCustomCategoryComment(desc, "Set the ID's for the GUI's to ensure that they don't clash with other mod's id's");
    GUI_CLAY_FURNACE = configuration.getInt("Clay Furnace GUI ID", desc, 0, 0, 100, "Set the ID for the Clay Furnace");
        
    desc = "Clay Furnace Burning Time";
    configuration.addCustomCategoryComment(desc, "Set your need value");
    ClayFurnaceCookTime = configuration.getInt("ClayFurnaceCookTime", "desc", 1000, 400, 1600, "Increased Cook Time");
        
    desc = "Version checking of the CVCR";
    configuration.addCustomCategoryComment(desc, "Show Updates for Complicated Vanilla Crafting Recipes");
    canShowUpdates = configuration.getBoolean("Show Updates", "Version checking of the CVCR", false, "If true, Complicated Vanilla Crafting Recipes will be displayed available updates in Minecraft. If false, Complicated Vanilla Crafting Recipes not will be checking available updates and display in the chat.", desc);
    if(configuration.hasChanged()) {
        configuration.save();
    }
}

    @Mod.EventBusSubscriber(modid = CVCRInformation.MOD_ID)
    public static class ChangeListener {
        @SubscribeEvent
        public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
            if(eventArgs.getModID().equals(CVCRInformation.MOD_ID)) {
                ConfigManager.sync(CVCRInformation.MOD_ID, Config.Type.INSTANCE);
            } load();
        }
    }
}
Код:
public class ClientProxy extends CommonProxy {
    @Override
    public void preInit(FMLPreInitializationEvent e) {
        CVCRConfig.loadConfiguration(e.getSuggestedConfigurationFile());
        super.preInit(e);
    }
Пробовал в Common
 
3,005
192
592
У GuiFactory наследование конфига можешь убирать, это не нужно.

Ты путь до GuiFactory прописал в Mod аннотации?
 
148
2
6
Код:
guiFactory = CVCRInformation.GUI_FACTORY,
Код:
import com.google.common.collect.Lists;

public class CVCRInformation {
    public static final String MOD_ID = "complicatedvanillacraftingrecipes";
    public static final String MOD_SHORT_ID = "cvcr";
    public static final String MOD_NAME = "Complicated Vanilla Crafting Recipes";
    public static final String MOD_VERSION = "1.1.8";
    public static final String ACCEPTED_VERSIONS = "[1.12,1.13)";
    public static final String DEPENDENCIES = "required-after:forge@[14.23.5.2836,)";
    public static final String URL = "https://minecraft.curseforge.com/projects/complicatedvanillacraftingrecipes";
    public static final List<String> AUTHOR = Lists.newArrayList("Hesperus");
    public static final String PARENT = "";
    public static final String LOGO = "assets/complicatedvanillacraftingrecipes/textures/logo.png";
    public static final String VERSIONURL = "https://github.com/Hesperusrus/Complicated-Vanilla-Crafting-Recipes/blob/master/update.json";

    public static final String CLIENT = "com.hesperus_rus.complicatedvanillacraftingrecipes.proxy.ClientProxy";
    public static final String SERVER = "com.hesperus_rus.complicatedvanillacraftingrecipes.proxy.CommonProxy";
    public static final String GUI_FACTORY = "com.hesperus_rus.complicatedvanillacraftingrecipes.proxy.GuiFactory";
}
 
148
2
6
2-ой день шёл, короче, такой метод нерабочий
 
3,005
192
592
*Тут должно быть кучу всякого оскорбления в сторону аффтара, но ему и так уже досталось, судя даже по конфигу*

Вот так попробуй:
(Если что, я даже не запускал и не смотрел, как это будет выглядить)
Код:
@Config(modid = CVCRInformation.MOD_ID)
public class SomeClass {

    @Config.Comment("Set the ID's for the GUI's to ensure that they don't clash with other mod's id's")
    public static GuiID guiID = new GuiID();
    @Config.Comment("Set your need value")
    public static BurnTime burnTime = new BurnTime();
    @Config.Comment("Show Updates for Complicated Vanilla Crafting Recipes")
    public static VersionChecking versionChecking = new VersionChecking();

    public static class GuiID {
        @Config.Comment("Set the ID for the Clay Furnace")
        @Config.Name("Clay Furnace GUI ID")
        @Config.RangeInt(min = 0, max = 100)
        public static int GUI_CLAY_FURNACE = 0;
    }

    public static class BurnTime {
        @Config.Comment("Increased Cook Time")
        @Config.Name("ClayFurnaceCookTime")
        @Config.RangeInt(min = 400, max = 1600)
        public static int ClayFurnaceCookTime = 1000;
    }

    public static class VersionChecking {
        @Config.Comment("If true, Complicated Vanilla Crafting Recipes will be displayed available updates in Minecraft. If false, Complicated Vanilla Crafting Recipes not will be checking available updates and display in the chat.")
        @Config.Name("Show Updates")
        public static boolean canShowUpdates = false;
    }

    @Mod.EventBusSubscriber(modid = CVCRInformation.MOD_ID)
    public static class ChangeListener {
        @SubscribeEvent
        public static void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
            if(eventArgs.getModID().equals(CVCRInformation.MOD_ID))
                ConfigManager.sync(CVCRInformation.MOD_ID, Config.Type.INSTANCE);
        }
    }
}
 
Сверху