Configuration

Configuration

2M Downloads

i get an error from the library

zaze06 opened this issue ยท 3 comments

commented
[22:55:01] [modloading-worker-2/ERROR] [ne.mi.fm.ja.FMLModContainer/LOADING]: Failed to create mod instance. ModID: configuration, class dev.toma.configuration.Configuration
java.lang.NoSuchMethodError: net.minecraft.util.math.MathHelper.func_76125_a(III)I
	at dev.toma.configuration.api.type.IntType.<init>(IntType.java:26) ~[configuration:1.2.0] {re:classloading}
	at dev.toma.configuration.api.type.IntType.<init>(IntType.java:22) ~[configuration:1.2.0] {re:classloading}
	at dev.toma.configuration.internal.ConfigWriter.writeInt(ConfigWriter.java:109) ~[configuration:1.2.0] {re:classloading}
	at dev.toma.configuration.example.ExampleConfig.buildConfig(ExampleConfig.java:33) ~[configuration:1.2.0] {re:classloading}
	at dev.toma.configuration.internal.ConfigHandler.createDefaultConfigFile(ConfigHandler.java:52) ~[configuration:1.2.0] {re:classloading}
	at dev.toma.configuration.internal.ConfigHandler.loadModConfig(ConfigHandler.java:37) ~[configuration:1.2.0] {re:classloading}
	at dev.toma.configuration.Configuration.init(Configuration.java:77) ~[configuration:1.2.0] {re:classloading}
	at dev.toma.configuration.Configuration.<init>(Configuration.java:46) ~[configuration:1.2.0] {re:classloading}
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_292] {}
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_292] {}
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_292] {}
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_292] {}
	at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_292] {}
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:81) ~[forge:36.1] {re:classloading}
	at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$4(ModContainer.java:120) ~[forge:?] {re:classloading}
	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640) [?:1.8.0_292] {}
	at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1632) [?:1.8.0_292] {}
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) [?:1.8.0_292] {}
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) [?:1.8.0_292] {}
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) [?:1.8.0_292] {}
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175) [?:1.8.0_292] {}

this is my Config.java file

package me.alien.speedomiter;

import dev.toma.configuration.api.IConfigPlugin;
import dev.toma.configuration.api.IConfigWriter;
import dev.toma.configuration.api.type.BooleanType;

@dev.toma.configuration.api.Config
public class Config implements IConfigPlugin {
    public static BooleanType imBoolean;

    @Override
    public void buildConfig(IConfigWriter writer) {
        imBoolean = writer.writeBoolean("Im Boolean", true, "This is an boolean value");

    }

    @Override
    public String getConfigFileName() {
        return "SpeedometerConfig";
    }

    @Override
    public String getModID() {
        return Main.MODID; // Main.MODID = "speedometer"
    }
}
commented

no i added the jar file as a library add in build.gradle so is was a error by me

commented

I just implemented it wrong :) i normally doesn't use library for my mods

commented

Okay, glad you figured it out. I think I have incorrect information regarding dependency setup on the wiki.