Closed gengyoubo closed 1 month ago
Is this your fork of the Changed:MC mod? What project are you attempting to run? The error tells me the Changed:MC mod wasn't deobfuscated, which could mean different problems depending on what you are trying to do.
runClient
What do I do?
I don't see any references to changed in your repo. Are you attempting to run changes that aren't commited to the repo?
The problem now is that I can't start the game when I add the mods
But with the "PCL2" launcher this problem does not occur!
You can't add mods to the dev environment in the traditional way. You need to reference it in the build.gradle
file.
What do I do?
Refer to "How can I make my own sub-mod?" On the main GitHub page.
Did what you did and still got the following code ......
Exception in thread "main" java.lang.ClassFormatError: Incompatible magic value 0 in class file sun/misc/Unsafe at java.base/java.lang.ClassLoader.findBootstrapClass(Native Method) at java.base/java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1267) at java.base/java.lang.System$2.findBootstrapClassOrNull(System.java:2314) at java.base/jdk.internal.loader.ClassLoaders$BootClassLoader.loadClassOrNull(ClassLoaders.java:140) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:700) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:669) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:639) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:375) at com.google.gson.internal.reflect.UnsafeReflectionAccessor.getUnsafeInstance(UnsafeReflectionAccessor.java:70) at com.google.gson.internal.reflect.UnsafeReflectionAccessor.<init>(UnsafeReflectionAccessor.java:34) at com.google.gson.internal.reflect.ReflectionAccessor.<clinit>(ReflectionAccessor.java:36) at com.google.gson.internal.ConstructorConstructor.<init>(ConstructorConstructor.java:51) at com.google.gson.Gson.<init>(Gson.java:206) at com.google.gson.GsonBuilder.create(GsonBuilder.java:597) at net.minecraftforge.installertools.ConsoleTool.<clinit>(ConsoleTool.java:31)
Caused by: java.io.FileNotFoundException: D:\.gradle\jdks\adoptium-17-x64-hotspot-windows\jdk-17.0.11+9\lib\tzdb.dat (ϵͳ�Ҳ���ָ�����ļ���)
Caused by: org.gradle.process.internal.ExecException: Process 'Gradle Worker Daemon 1' finished with non-zero exit value 1
Caused by: java.io.FileNotFoundException: D:\.gradle\jdks\adoptium-17-x64-hotspot-windows\jdk-17.0.11+9\lib\tzdb.dat (ϵͳ�Ҳ���ָ�����ļ���)
Caused by: org.gradle.process.internal.ExecException: Process 'Gradle Worker Daemon 2' finished with non-zero exit value 1
`Could not resolve all files for configuration ':runtimeClasspathCopy'.
Could not find net.ltxprogrammer.changed:Changed-m1.18.2-f40.2.0:v0.13.1_mapped_official_1.18.2. Searched in the following locations:
- file:/D:/.gradle/caches/forge_gradle/bundled_deobf_repo/net/ltxprogrammer/changed/Changed-m1.18.2-f40.2.0/v0.13.1_mapped_official_1.18.2/Changed-m1.18.2-f40.2.0-v0.13.1_mapped_official_1.18.2.pom
- file:/D:/.gradle/caches/forge_gradle/bundled_deobf_repo/net/ltxprogrammer/changed/Changed-m1.18.2-f40.2.0/v0.13.1_mapped_official_1.18.2/Changed-m1.18.2-f40.2.0-v0.13.1_mapped_official_1.18.2.jar Required by: project : Could not find net.minecraftforge:forge:1.18.2-40.2.17_mapped_official_1.18.2. Searched in the following locations:
- file:/D:/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.18.2-40.2.17_mapped_official_1.18.2/forge-1.18.2-40.2.17_mapped_official_1.18.2.pom
- file:/D:/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.18.2-40.2.17_mapped_official_1.18.2/forge-1.18.2-40.2.17_mapped_official_1.18.2.jar Required by: project :
Possible solution:
`
Exception in thread "main" org.spongepowered.asm.launch.MixinInitialisationError: Error initialising mixin config mixins.changedplus.json at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.Config.create(Config.java:153) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.Mixins.createConfiguration(Mixins.java:100) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.Mixins.addConfiguration(Mixins.java:87) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.platform.MixinPlatformManager.addConfig(MixinPlatformManager.java:262) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.platform.MixinPlatformManager.prepare(MixinPlatformManager.java:169) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.MixinBootstrap.doInit(MixinBootstrap.java:196) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.MixinLaunchPluginLegacy.initializeLaunch(MixinLaunchPluginLegacy.java:200) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.launch.MixinLaunchPlugin.initializeLaunch(MixinLaunchPlugin.java:34) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.LaunchPluginHandler.lambda$announceLaunch$11(LaunchPluginHandler.java:100) at java.base/java.util.HashMap.forEach(HashMap.java:1421) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.LaunchPluginHandler.announceLaunch(LaunchPluginHandler.java:100) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:51) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.Launcher.run(Launcher.java:106) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.Launcher.main(Launcher.java:77) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) at MC-BOOTSTRAP/cpw.mods.modlauncher@9.1.3/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) at cpw.mods.bootstraplauncher@1.0.0/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) Caused by: java.lang.IllegalArgumentException: The specified resource 'mixins.changedplus.json' was invalid or could not be read at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.MixinConfig.create(MixinConfig.java:1282) at MC-BOOTSTRAP/org.spongepowered.mixin/org.spongepowered.asm.mixin.transformer.Config.create(Config.java:148) ... 17 more
Have you actually tried to make your mod accessory mod yourself?
It started successfully, but I still need to study the principles of it ......
buildscript { repositories { // ForgeGradle 插件的 Maven 仓库 maven { url = 'https://maven.minecraftforge.net' } maven { url = 'https://repo.spongepowered.org/repository/maven-public/' } // 其他依赖的中央仓库 mavenCentral() } dependencies { // ForgeGradle 插件的依赖,用于构建 Minecraft 模组 classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT' } }
// 应用 ForgeGradle 插件 apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' // 应用 Eclipse 插件,用于 IDE 集成 apply plugin: 'eclipse' // 应用 Maven 发布插件,用于发布构件 apply plugin: 'maven-publish'
// 项目版本、组和归档基名称配置 version = '0.0.0' group = 'github.com.gengyoubo.changedplus' archivesBaseName = 'changedplus'
// Java 工具链配置,使用 Java 17 java.toolchain.languageVersion = JavaLanguageVersion.of(17)
// 打印系统信息 println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
minecraft { // 配置 Minecraft 映射版本 mappings channel: 'official', version: '1.18.2'
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
runs {
// 客户端运行配置
client {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
changedplus {
source sourceSets.main
}
}
}
// 服务端运行配置
server {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
mods {
changedplus {
source sourceSets.main
}
}
}
// 游戏测试服务端配置
gameTestServer {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
property 'forge.enabledGameTestNamespaces', 'xiaozhong'
mods {
changedplus {
source sourceSets.main
}
}
}
// 数据生成配置
data {
workingDirectory project.file('run')
property 'forge.logging.markers', 'REGISTRIES'
property 'forge.logging.console.level', 'debug'
args '--mod', 'changedplus ',
'--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
mods {
changedplus {
source sourceSets.main
}
}
}
}
}
// 资源文件生成目录配置 sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories { flatDir { dirs 'libs' } maven { // SlimeKnights and JEI name 'DVS1 Maven FS' url 'https://dvs1.progwml6.com/files/maven' } maven { // location of the maven that hosts JEI files name = "Progwml6 maven" url = "https://dvs1.progwml6.com/files/maven/" } maven { // location of a maven mirror for JEI files, as a fallback name = "ModMaven" url = "https://modmaven.dev" } maven { url "https://maven.shedaniel.me" }
maven {
name = "Changed"
url = "https://raw.githubusercontent.com/LtxProgrammer/Changed-Minecraft-Mod/master/mcmodsrepo/"
}
} mixin { add sourceSets.main, "changed.refmap.json"
config "changed.mixins.json"
config "changed.compatibility.mixins.json"
} dependencies { // Minecraft Forge 依赖 minecraft 'net.minecraftforge:forge:1.18.2-40.2.21' implementation fg.deobf("net.ltxprogrammer.changed:Changed-m1.18.2-f40.2.0:v0.13.1")
}
// JAR 文件的清单配置 jar { manifest { attributes([ "Specification-Title" : "changedplus ", "Specification-Vendor" : "gengyoubo", "Specification-Version" : "1", "Implementation-Title" : project.name, "Implementation-Version" : project.jar.archiveVersion, "Implementation-Vendor" : "gengyoubo", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } }
// 在 JAR 任务完成后执行 reobfJar 任务 jar.finalizedBy('reobfJar')
// 发布配置 publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { // 本地 Maven 仓库路径 url "file://${project.projectDir}/mcmodsrepo" } } }
Have you actually tried to make your mod accessory mod yourself?
I have. Back when the dev of the Turned mod was still active, I worked with his source code to write his mod an extension for the Changed:MC. The project is since shutdown, because the dev wanted to break ties with Dragon Snow.
And then you made a new mod from scratch?
No. Changed: MC is the first mod I've ever made, and it was from scratch. The Turned extension mod I made afterwards was adapted from his source code to work alongside Changed: MC.
That means you're using turn's source code?
Not at all for the main mod. I have since stopped working on the turned extension out of respect for the original dev. To clarify, Changed: MC is made from scratch.
When I started minecraft with IDEA it reported the following error.