We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When im trying to include it to jar and run minecraft - it crushes with folowing error:
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory at com.github.sarxos.webcam.Webcam.(Webcam.java:101)
but if i open /jar file with archivator, this class exist. This is cuz when minecraft injectings mods - he exclude all org. packages.
Im using folowing gradle code:
buildscript { repositories { mavenCentral() maven { url = "https://plugins.gradle.org/m2" } maven { url = "https://repo.spongepowered.org/maven" } maven { url = "https://maven.minecraftforge.net/" } } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3+', changing: true classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.3' } } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'com.github.johnrengelman.shadow'
version = "1.12.2" group = "ru.packetdupe.mod" archivesBaseName = "ratnichek"
sourceCompatibility = targetCompatibility = 1.8 compileJava.options.encoding = compileTestJava.options.encoding = "UTF-8"
minecraft {
mappings channel: 'stable', version: "39-1.12" runs { client { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' } }
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories { maven { url = "https://repo.spongepowered.org/maven" } maven { name = 'impactdevelopment-repo' url = 'https://impactdevelopment.github.io/maven/' } maven { name = "jitpack.io" url = "https://jitpack.io" } maven { name = 'swt-repo' url = "http://maven-eclipse.github.io/maven" } mavenCentral() jcenter() }
dependencies { minecraft "net.minecraftforge:forge:1.12.2-14.23.5.2855" implementation 'net.lingala.zip4j:zip4j:2.11.2' implementation 'org.apache.commons:commons-collections4:4.4' implementation 'com.google.code.gson:gson:2.8.9' implementation 'org.json:json:20220320' implementation 'com.squareup.okhttp3:okhttp:3.14.9' implementation 'net.java.dev.jna:jna-platform:5.12.1' implementation 'com.google.guava:guava:23.0' implementation 'com.github.sarxos:webcam-capture:0.3.12' implementation 'org.slf4j:slf4j-api:2.0.1' implementation 'ch.qos.logback:logback-classic:1.0.9' }
shadowJar{ dependencies { include(dependency('net.lingala.zip4j:zip4j:2.11.2')) include(dependency('org.apache.commons:commons-collections4:4.4')) include(dependency('com.google.code.gson:gson:2.8.9')) include(dependency('org.json:json:20220320')) include(dependency('com.squareup.okhttp3:okhttp:3.14.9')) include(dependency('net.java.dev.jna:jna-platform:5.12.1')) include(dependency('com.google.guava:guava:23.0')) include(dependency('com.github.sarxos:webcam-capture:0.3.12')) include(dependency('ch.qos.logback:logback-classic:1.0.9')) } }
reobf { shadowJar {} }
jar { manifest { attributes([ "Implementation-Title" : 'ratnicheck', "Implementation-Version" : '1.12.2', "FMLCorePluginContainsFMLMod": "true", "ForceLoadAsMod": "true", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } }
jar.finalizedBy('reobfJar')
Pls dont say me im stupid. just help me fix it, thank you!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When im trying to include it to jar and run minecraft - it crushes with folowing error:
java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
at com.github.sarxos.webcam.Webcam.(Webcam.java:101)
but if i open /jar file with archivator, this class exist. This is cuz when minecraft injectings mods - he exclude all org. packages.
Im using folowing gradle code:
buildscript {
repositories {
mavenCentral()
maven { url = "https://plugins.gradle.org/m2" }
maven { url = "https://repo.spongepowered.org/maven" }
maven { url = "https://maven.minecraftforge.net/" }
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3+', changing: true
classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.3'
}
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'com.github.johnrengelman.shadow'
version = "1.12.2"
group = "ru.packetdupe.mod"
archivesBaseName = "ratnichek"
sourceCompatibility = targetCompatibility = 1.8
compileJava.options.encoding = compileTestJava.options.encoding = "UTF-8"
minecraft {
}
sourceSets.main.resources { srcDir 'src/generated/resources' }
repositories {
maven { url = "https://repo.spongepowered.org/maven" }
maven {
name = 'impactdevelopment-repo'
url = 'https://impactdevelopment.github.io/maven/'
}
maven {
name = "jitpack.io"
url = "https://jitpack.io"
}
maven {
name = 'swt-repo'
url = "http://maven-eclipse.github.io/maven"
}
mavenCentral()
jcenter()
}
dependencies {
minecraft "net.minecraftforge:forge:1.12.2-14.23.5.2855"
implementation 'net.lingala.zip4j:zip4j:2.11.2'
implementation 'org.apache.commons:commons-collections4:4.4'
implementation 'com.google.code.gson:gson:2.8.9'
implementation 'org.json:json:20220320'
implementation 'com.squareup.okhttp3:okhttp:3.14.9'
implementation 'net.java.dev.jna:jna-platform:5.12.1'
implementation 'com.google.guava:guava:23.0'
implementation 'com.github.sarxos:webcam-capture:0.3.12'
implementation 'org.slf4j:slf4j-api:2.0.1'
implementation 'ch.qos.logback:logback-classic:1.0.9'
}
shadowJar{
dependencies {
include(dependency('net.lingala.zip4j:zip4j:2.11.2'))
include(dependency('org.apache.commons:commons-collections4:4.4'))
include(dependency('com.google.code.gson:gson:2.8.9'))
include(dependency('org.json:json:20220320'))
include(dependency('com.squareup.okhttp3:okhttp:3.14.9'))
include(dependency('net.java.dev.jna:jna-platform:5.12.1'))
include(dependency('com.google.guava:guava:23.0'))
include(dependency('com.github.sarxos:webcam-capture:0.3.12'))
include(dependency('ch.qos.logback:logback-classic:1.0.9'))
}
}
reobf {
shadowJar {}
}
jar {
manifest {
attributes([
"Implementation-Title" : 'ratnicheck',
"Implementation-Version" : '1.12.2',
"FMLCorePluginContainsFMLMod": "true",
"ForceLoadAsMod": "true",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
jar.finalizedBy('reobfJar')
Pls dont say me im stupid.
just help me fix it, thank you!
The text was updated successfully, but these errors were encountered: