#How to use other jar library

30 messages · Page 1 of 1 (latest)

fossil cave
#

I want to use library that plays custom sound, it works when I test it in IntelliJ IDEA but when I put this mod into tlauncher minecraft mods folder it doesn't.

safe venture
#
  1. Don't use tlauncher.
  2. Show your build.gradle.
#
  1. Show the log.
fossil cave
#

build.gradle

#
plugins {
    id 'fabric-loom' version '1.5-SNAPSHOT'
    id 'maven-publish'
}

version = project.mod_version
group = project.maven_group

base {
    archivesName = project.archives_base_name
}

repositories {
}

loom {
    splitEnvironmentSourceSets()

    mods {
        "modid" {
            sourceSet sourceSets.main
            sourceSet sourceSets.client
        }
    }

}

dependencies {
    // To change the versions see the gradle.properties file
    minecraft "com.mojang:minecraft:${project.minecraft_version}"
    mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
    modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

    // Fabric API. This is technically optional, but you probably want it anyway.
    modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

    implementation (files('src/main/resources/assets/modid/libraries/jl1.0.1.jar'))
    implementation files('src/main/resources/assets/modid/libraries/jl1.0.1.jar')
    implementation files('libs/jl1.0.1.jar')
    implementation (files('libs/jl1.0.1.jar'))
}

processResources {
    inputs.property "version", project.version

    filesMatching("fabric.mod.json") {
        expand "version": project.version
    }
}

tasks.withType(JavaCompile).configureEach {
    it.options.release = 17
}

java {
    withSourcesJar()

    sourceCompatibility = JavaVersion.VERSION_17
    targetCompatibility = JavaVersion.VERSION_17
}

jar {
    from("LICENSE") {
        rename { "${it}_${project.base.archivesName.get()}"}
    }
}


publishing {
    publications {
        mavenJava(MavenPublication) {
            from components.java
        }
    }
    repositories {

    }
}
#

what exactly log do you want to see?

safe venture
fossil cave
#

I putted sending message between and after these two but it didn't work

#

but no crushes

cedar yarrow
#

Where you call playSound()

safe venture
cedar yarrow
fossil cave
safe venture
fossil cave
#

it seems like I make something wrong with other library

safe venture
cedar yarrow
#

Isn't server and client code should be separated with networking 👀👀

fossil cave
#

Yes, then zombie dies

fossil cave
#

idk :З

#

it works in intelliJ IDEA

#

when I starts runClient

cedar yarrow
#

Did you compiled it correctly

fossil cave
#

Mabye

safe venture
#

I really don't understand what this is

#

Why

fossil cave
#

I was trying to )

safe venture
fossil cave
#

I putted this lib everywhere