LDLib

LDLib

333k Downloads

Mixin crash

DreamhackOleg opened this issue ยท 16 comments

commented

I want to add some shaders, and looks like ideally, LDLib can fix that, but I dont know can I use that and If, will be GTCEU conflict, because its have LDLIB as embedded library?

commented

Im not sure whether I understand your question correctly. You are curious that the embedded library has potential conflict with mod file or other embedded mod? if so, the answer is won't. It works well, because the forge / fabric loader will only load one mod at the same time, in general. mod file in folder> embedded mod. and only one mod is loaded among all same embedded libs.

commented

oh okay, thank you, but, can I use your lib for my mod? I just tried to implement my own shader into the game, but i dont want to spend hours about how to add it to the game, but not how shaders works.

commented

try this one?

 implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.20.1:1.0.35") { transitive = false }
commented

try this one?

 implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-1.20.1:1.0.35") { transitive = false }

Yes, firstly I tried to use latest version ldlib(1.0.35) and got mixin crash, then tried to use 1.0.34. Again, and same crash.

commented

btw, try to clean the cache (build folder, ide cache), regenerate idea runs

commented

btw, try to clean the cache (build folder, ide cache), regenerate idea runs

Oh, yes, i will try it now.

commented

if it still doesn't work, do you have github repo, I can help test it tmrw

commented

I tried to install LDLib into my mod via gradle by Wiki i found on official page mod Curseforge, but I have crash after trying to run Client:Mixin apply failed ldlib-common.mixins.json:accessor.EntityAccessor -> net.minecraft.world.entity.Entity: org.spongepowered.asm.mixin.gen.throwables.InvalidAccessorException No candidates were found matching m_284535_(Lnet/minecraft/world/level/Level;)V in net/minecraft/world/entity/Entity for ldlib-common.mixins.json:accessor.EntityAccessor->@Invoker[METHOD_PROXY]::invokeSetLevel(Lnet/minecraft/world/level/Level;)V [INJECT Applicator Phase -> ldlib-common.mixins.json:accessor.EntityAccessor -> Apply Accessors -> -> Locate -> ldlib-common.mixins.json:accessor.EntityAccessor->@Invoker[METHOD_PROXY]::invokeSetLevel(Lnet/minecraft/world/level/Level;)V] org.spongepowered.asm.mixin.gen.throwables.InvalidAccessorException: No candidates were found matching m_284535_(Lnet/minecraft/world/level/Level;)V in net/minecraft/world/entity/Entity for ldlib-common.mixins.json:accessor.EntityAccessor->@Invoker[METHOD_PROXY]::invokeSetLevel(Lnet/minecraft/world/level/Level;)V [INJECT Applicator Phase -> ldlib-common.mixins.json:accessor.EntityAccessor -> Apply Accessors -> -> Locate -> ldlib-common.mixins.json:accessor.EntityAccessor->@Invoker[METHOD_PROXY]::invokeSetLevel(Lnet/minecraft/world/level/Level;)V] at org.spongepowered.asm.mixin.gen.InvokerInfo.findTargetMethod(InvokerInfo.java:119) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.mixin.gen.InvokerInfo.locate(InvokerInfo.java:102) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.mixin.transformer.MixinTargetContext.generateAccessors(MixinTargetContext.java:1389) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyAccessors(MixinApplicatorStandard.java:1060) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.applyMixin(MixinApplicatorStandard.java:398) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.mixin.transformer.MixinApplicatorStandard.apply(MixinApplicatorStandard.java:325) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.mixin.transformer.TargetClassContext.apply(TargetClassContext.java:383) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.mixin.transformer.TargetClassContext.applyMixins(TargetClassContext.java:365) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.mixin.transformer.MixinProcessor.applyMixins(MixinProcessor.java:363) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.mixin.transformer.MixinTransformer.transformClass(MixinTransformer.java:250) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.service.modlauncher.MixinTransformationHandler.processClass(MixinTransformationHandler.java:131) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at org.spongepowered.asm.launch.MixinLaunchPluginLegacy.processClass(MixinLaunchPluginLegacy.java:131) ~[mixin-0.8.5.jar:0.8.5+Jenkins-b310.git-155314e6e91465dad727e621a569906a410cd6f4] at cpw.mods.modlauncher.serviceapi.ILaunchPluginService.processClassWithFlags(ILaunchPluginService.java:156) ~[modlauncher-10.0.9.jar:10.0.9+10.0.9+main.dcd20f30] at cpw.mods.modlauncher.LaunchPluginHandler.offerClassNodeToPlugins(LaunchPluginHandler.java:88) ~[modlauncher-10.0.9.jar:?] at cpw.mods.modlauncher.ClassTransformer.transform(ClassTransformer.java:120) ~[modlauncher-10.0.9.jar:?] at cpw.mods.modlauncher.TransformingClassLoader.maybeTransformClassBytes(TransformingClassLoader.java:50) ~[modlauncher-10.0.9.jar:?] at cpw.mods.cl.ModuleClassLoader.readerToClass(ModuleClassLoader.java:113) ~[securejarhandler-2.1.10.jar:?] at cpw.mods.cl.ModuleClassLoader.lambda$findClass$15(ModuleClassLoader.java:219) ~[securejarhandler-2.1.10.jar:?] at cpw.mods.cl.ModuleClassLoader.loadFromModule(ModuleClassLoader.java:229) ~[securejarhandler-2.1.10.jar:?] at cpw.mods.cl.ModuleClassLoader.findClass(ModuleClassLoader.java:219) ~[securejarhandler-2.1.10.jar:?] at cpw.mods.cl.ModuleClassLoader.loadClass(ModuleClassLoader.java:135) ~[securejarhandler-2.1.10.jar:?] at java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[?:?] at net.minecraftforge.registries.GameData.init(GameData.java:107) ~[forge-1.20.1-47.3.0_mapped_official_1.20.1.jar%23190%23197!/:?] at net.minecraftforge.registries.GameData.<clinit>(GameData.java:93) ~[forge-1.20.1-47.3.0_mapped_official_1.20.1.jar%23190%23197!/:?] at net.minecraft.core.registries.BuiltInRegistries.forge(BuiltInRegistries.java:429) ~[forge-1.20.1-47.3.0_mapped_official_1.20.1.jar%23191!/:?] at net.minecraft.core.registries.BuiltInRegistries.forge(BuiltInRegistries.java:409) ~[forge-1.20.1-47.3.0_mapped_official_1.20.1.jar%23191!/:?] at net.minecraft.core.registries.BuiltInRegistries.<clinit>(BuiltInRegistries.java:121) ~[forge-1.20.1-47.3.0_mapped_official_1.20.1.jar%23191!/:?] at net.minecraft.server.Bootstrap.bootStrap(Bootstrap.java:43) ~[forge-1.20.1-47.3.0_mapped_official_1.20.1.jar%23191!/:?] at net.minecraft.client.main.Main.lambda$main$0(Main.java:151) ~[forge-1.20.1-47.3.0_mapped_official_1.20.1.jar%23191!/:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?] at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] at java.lang.Thread.run(Thread.java:842) ~[?:?]

commented

what does your gradle file look like?

commented

what does your gradle file look like?

`plugins {
id 'eclipse'
id 'idea'
id 'maven-publish'
id 'net.minecraftforge.gradle' version '[6.0,6.2)'
}

version = mod_version
group = mod_group_id

base {
archivesName = mod_id
}

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 {
mappings channel: mapping_channel, version: mapping_version
copyIdeResources = true
runs {
// applies to all the run configs below
configureEach {
workingDirectory project.file('run')

        // Recommended logging data for a userdev environment
        // The markers can be added/remove as needed separated by commas.
        // "SCAN": For mods scan.
        // "REGISTRIES": For firing of registry events.
        // "REGISTRYDUMP": For getting the contents of all registries.
        property 'forge.logging.markers', 'REGISTRIES'

        // Recommended logging level for the console
        // You can set various levels here.
        // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
        property 'forge.logging.console.level', 'debug'

        mods {
            "${mod_id}" {
                source sourceSets.main
            }
        }
    }

    client {
        // Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
        property 'forge.enabledGameTestNamespaces', mod_id
    }

    server {
        property 'forge.enabledGameTestNamespaces', mod_id
        args '--nogui'
    }

    gameTestServer {
        property 'forge.enabledGameTestNamespaces', mod_id
    }

    data {
        // example of overriding the workingDirectory set in configureEach above
        workingDirectory project.file('run-data')

        // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
        args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
    }
}

}

// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }

repositories {
// Put repositories for dependencies here
// ForgeGradle automatically adds the Forge maven and Maven Central for you

// If you have mod jar dependencies in ./libs, you can declare them as a repository like so.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html#sub:flat_dir_resolver
// flatDir {
//     dir 'libs'
// }

maven { // JEI
    url "https://maven.blamejared.com"
}
maven { // TOP
    url "https://maven.k-4u.nl"
}
maven { //LDLIB
    name "firstdarkdev"
    url "https://maven.firstdarkdev.xyz/snapshots"
}

}

dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"

compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}")
compileOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}")
runtimeOnly fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}")

implementation fg.deobf(project.dependencies.create("mcjty.theoneprobe:theoneprobe:${top_version}") {
    transitive = false
})

implementation fg.deobf("com.lowdragmc.ldlib:ldlib-forge-${ldlib_minecraft_version}:${ld_liblatest_version}") { transitive = false }

}

tasks.named('processResources', ProcessResources).configure {
var replaceProperties = [
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
forge_version: forge_version, forge_version_range: forge_version_range,
loader_version_range: loader_version_range,
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
mod_authors: mod_authors, mod_description: mod_description,
]
inputs.properties replaceProperties

filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
    expand replaceProperties + [project: project]
}

}

// Example for how to get properties into the manifest for reading at runtime.
tasks.named('jar', Jar).configure {
manifest {
attributes([
'Specification-Title' : mod_id,
'Specification-Vendor' : mod_authors,
'Specification-Version' : '1', // We are version 1 of ourselves
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Implementation-Vendor' : mod_authors,
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}

// This is the preferred method to reobfuscate your jar file
finalizedBy 'reobfJar'

}

// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing:
// tasks.named('publish').configure {
// dependsOn 'reobfJar'
// }

// Example configuration to allow publishing using the maven-publish plugin
publishing {
publications {
register('mavenJava', MavenPublication) {
artifact jar
}
}
repositories {
maven {
url "file://${project.projectDir}/mcmodsrepo"
}
}
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
`

commented

I tried to downgrade forge to 47.3.0, but its not helped and ldlib also tried, to 34, but its not working.

commented

Im using latest version LDLib for forge and version Forge is 1.20.1 - 47.3.29

commented

if it still doesn't work, do you have github repo, I can help test it tmrw

Okay, i tried it. Firstly, ./gradlew clean ran, cleaned more stuff, then ./gradlew build --refresh-dependencies, and, you know. So, it didnt work. I will try to add github repo for my mod now.

commented

if it still doesn't work, do you have github repo, I can help test it tmrw

Here is github repo: https://github.com/KaxelDreamhack123/MoreNukes

commented

if it still doesn't work, do you have github repo, I can help test it tmrw

Here is github repo: https://github.com/KaxelDreamhack123/MoreNukes

from the quick view, you didn't enable mixins for your forge project.

check https://github.com/SpongePowered/Mixin/wiki/Mixins-on-Minecraft-Forge for details

not sure whether caused by it. I will try the project tmrw. gn

commented

if it still doesn't work, do you have github repo, I can help test it tmrw

Here is github repo: https://github.com/KaxelDreamhack123/MoreNukes

from the quick view, you didn't enable mixins for your forge project.

check https://github.com/SpongePowered/Mixin/wiki/Mixins-on-Minecraft-Forge for details

not sure whether caused by it. I will try the project tmrw. gn

hmmmmmmmmmmmmmmmm. Thats fixed Issue!!! Thank you man, I didn't think that I would need to create my own mixins first.