Toma1O6 / Configuration

Simple annotation based config manager which supports multiple file formats
https://www.curseforge.com/minecraft/mc-mods/configuration
2 stars 2 forks source link

[1.18.2-14.2.10] Error Message on Runtime #8

Closed SparkleArts closed 11 months ago

SparkleArts commented 11 months ago

First of all, I use your API Mod for the first time, but I get an Error Message if I try to run the Client.

I attached the log file. latest.log

Toma1O6 commented 11 months ago

If I understand correctly - you are trying to implement this library into your mod? If yes, can you post some link to your source code on github? Or just the part where you add this mod as dependency in build.gradle?

SparkleArts commented 11 months ago

I just added this:

repositories {
  maven {
      url = "https://www.cursemaven.com"
      content {
          includeGroup "curse.maven"
      }
  }
}
dependencies {
    implementation fg.deobf("curse.maven:configuration-444699:4519564")
}

for implementing the api.

Toma1O6 commented 11 months ago

Okay, so it looks like the mixin is not being remapped in development environment by default. I have found solution for this: Add mixin repository, dependency and plugin to buildscript block in build.gradle

buildscript {
    repositories {
        maven { url = 'https://maven.minecraftforge.net' }
        mavenCentral()
        // Add mixin repository
        maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
    }
    dependencies {
        classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
        // Add mixin dependency
        classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
    }
}

plugins {
    id 'eclipse'
    id 'maven-publish'
}
apply plugin: 'net.minecraftforge.gradle'
// Add mixin plugin
apply plugin: 'org.spongepowered.mixin'

Then just run genIntellijIdeaRuns configuration to apply changes and it should work. There may be other solutions to this (such as runtime arguments), but this solution has worked for me. I'll add information about this to the wiki

Toma1O6 commented 11 months ago

And maybe better solution if you do not plan to use mixins within your mod is to add these arguments into your run configurations in build.gradle:

properties 'mixin.env.remapRefMap': 'true'
property 'mixin.env.refMapRemappingFile', "${project.projectDir}/build/createSrgToMcp/output.srg"
SparkleArts commented 11 months ago

Well, I try to make it functional for MCreator (for testing purpose). It seems not to work within MCreator -_-

But here is the Github Source Code for the Mod I want to create.