WTHIT

WTHIT

12M Downloads

API crashes even when used only as compile

LostQuasar opened this issue · 10 comments

commented

Crash:

Caused by: mcp.mobius.waila.api.__internal__.ApiJarInRuntimeException: ONLY USE WTHIT API JAR AS A COMPILE ONLY DEPENDENCY

Import:

    modCompileOnly "mcp.mobius.waila:wthit-api:fabric-${wthit_version}"
    modRuntimeOnly "mcp.mobius.waila:wthit:fabric-${wthit_version}"

Version:
4.7.3

commented
plugins {
	id 'fabric-loom' version '0.11-SNAPSHOT'
	id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version+ "+" +project.minecraft_version
group = project.maven_group

repositories { 
    jcenter() 
	maven {
		url = uri("https://storage.googleapis.com/devan-maven/")
	}
	maven { url "https://maven.bai.lol" }
}


dependencies {
    minecraft "com.mojang:minecraft:${minecraft_version}"
    mappings "net.fabricmc:yarn:${yarn_mappings}:v2"
    modImplementation "net.fabricmc:fabric-loader:${loader_version}"
    modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"

    modImplementation "net.devtech:arrp:${arrp_version}"
	include "net.devtech:arrp:${arrp_version}"

  	modCompileOnly "mcp.mobius.waila:wthit-api:fabric-${wthit_version}"
  	modRuntimeOnly "mcp.mobius.waila:wthit:fabric-${wthit_version}"
  }


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

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

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

java {
	// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
	// if it is present.
	// If you remove this line, sources will not be generated.
	withSourcesJar()
}

jar {
	from("LICENSE") {
		rename { "${it}_${project.archivesBaseName}"}
	}
}

// configure the maven publication
publishing {
	publications {
		mavenJava(MavenPublication) {
			// add all the jars that should be included when publishing to maven
			artifact(remapJar) {
				builtBy remapJar
			}
			artifact(sourcesJar) {
				builtBy remapSourcesJar
			}
		}
	}

	// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
	repositories {
		// Add repositories to publish to here.
		// Notice: This block does NOT have the same function as the block in the top level.
		// The repositories here will be used for publishing your artifact, not for
		// retrieving dependencies.
	}
}
commented

Can you post your full build.gradle?

commented

What IDE are you using? What about if you use gradlew runClient on the terminal? What's the output of gradlew dependencies?

commented

huh gradlew runClient works

commented

Hmm your IDE might be messing with the classpath. What IDE is that?

commented

VSCodium

commented

Try running gradlew vscode and see if it fixes it.

commented

no luck

commented

Try deleting all vscode related files (should be in .gitignore if you use the fabric-example-mod teemplate) and reload the project.

commented