Closed SiverDX closed 1 year ago
Strange, Loaded and prepared
string should show up even if you haven't added any code. What does your build.gradle look like?
I added runtimeOnly fg.deobf("dev.buildtool:trajectory-preview:${trajectory_preview_version}:unobf")
just now to see if I need it but it does not change anything
buildscript {
repositories {
maven { url 'https://maven.minecraftforge.net' }
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
mavenCentral()
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
classpath 'org.parchmentmc:librarian:1.+'
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'org.parchmentmc.librarian.forgegradle'
apply plugin: 'org.spongepowered.mixin'
minecraft {
mappings channel: 'parchment', version: "${parchment_version}-${minecraft_version}"
runs {
client {
workingDirectory project.file('run')
ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Client'
mods {
modClientRun {
source sourceSets.main
}
}
}
server {
workingDirectory project.file('run')
ideaModule "${rootProject.name}.${project.name}.main"
taskName 'Server'
mods {
modServerRun {
source sourceSets.main
}
}
}
}
}
repositories {
maven { url = "https://www.cursemaven.com" }
maven { url = "https://mymavenrepo.com/repo/XXNTQu0VdMr93BjoOV1S/" } // Trajectory Preview
flatDir {
dirs 'dev'
}
}
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
implementation fg.deobf("curse.maven:obscure-api-638417:4522272") // 15 : 1.19.2
implementation fg.deobf("curse.maven:trajectory-preview-289141:4493729") // 4.5.1 : 1.19
implementation fg.deobf("curse.maven:creatures-and-beasts-414401:4411179") // 1.5.2 : 1.19.2
implementation("dev.buildtool:trajectory-preview:${trajectory_preview_version}:api")
runtimeOnly fg.deobf("dev.buildtool:trajectory-preview:${trajectory_preview_version}:unobf")
if(project.mixin.toBoolean()) annotationProcessor "org.spongepowered:mixin:${mixinVersion}:processor"
}
mixin {
if (project.mixin.toBoolean()) add sourceSets.main, "${mod_id}.refmap.json"
}
def resourceTargets = ['META-INF/mods.toml', 'pack.mcmeta', "${mod_id}.mixins.json".toString()]
def intoTargets = ["$rootDir/out/production/resources/", "$rootDir/out/production/${project.name}.main/", "$rootDir/bin/main/"]
def replaceProperties = [
modid : mod_id,
version : version,
displayName : mod_name,
author : mod_author,
license : mod_license,
desc : mod_description,
mcVersion : minecraft_version,
forgeVersion: forge_version,
mixins : mixins,
clientMixins: client_mixins
]
processResources {
inputs.properties replaceProperties
replaceProperties.put 'project', project
filesMatching(resourceTargets) {
expand replaceProperties
}
intoTargets.each { target ->
if (file(target).exists()) {
copy {
from(sourceSets.main.resources) {
include resourceTargets
expand replaceProperties
}
into target
}
}
}
}
jar {
manifest {
attributes(["Specification-Title" : project.file_name,
"Specification-Vendor" : project.mod_author,
"Specification-Version" : "1.0",
"Implementation-Title" : project.file_name,
"Implementation-Version" : project.version,
"Implementation-Vendor" : project.mod_author,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
"MixinConfigs" : project.mixin.toBoolean() ? "${mod_id}.mixins.json" : ""
])
}
}
jar.finalizedBy('reobfJar')
Removed runtimeOnly fg.deobf("curse.maven:trajectory-preview-289141:4493729")
BowArrowPreview
was coming from dev.buildtool.traj.preview.BowArrowPreview
instead of dev.buildtool.trajectory.preview.BowArrowPreview
Did not fix the issue though
Looking at the .jar in the mods
folder - the path is traj
Kinda would have expected an error then
Yeah, you only need
implementation("dev.buildtool:trajectory-preview:${trajectory_preview_version}:api")
runtimeOnly fg.deobf("dev.buildtool:trajectory-preview:${trajectory_preview_version}:unobf"
Don't add jars from curseforge or any other sources
So it's probably because the part which loads plugins is not in my .jar
(my mod) nor in the .jar
from curse
Do I need to provide the .jar
? Wouldn't it be duplicate then?
Also getting an error with build
Not sure why it worked before
implementation("dev.buildtool:trajectory-preview:${trajectoryPreview_version}:api")
compileOnly fg.deobf("dev.buildtool:trajectory-preview:${trajectoryPreview_version}:unobf")
(when adding compileOnly fg.deobf("dev.buildtool:trajectory-preview:${trajectoryPreview_version}:unobf")
)
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not resolve dev.buildtool:trajectory-preview:{strictly 4.5.1-1.19_mapped_parchment_2022.11.27-1.19.2}.
Required by:
project :
> Cannot find a version of 'dev.buildtool:trajectory-preview' that satisfies the version constraints:
Dependency path 'de.cadentem.trialanderror:Trial and Error modifications:1.0' --> 'dev.buildtool:trajectory-preview:{strictly 4.5.1-1.19_mapped_parchment_2022.11.27-1.19.2}'
Dependency path 'de.cadentem.trialanderror:Trial and Error modifications:1.0' --> 'dev.buildtool:trajectory-preview:4.5.1-1.19'
> Could not resolve dev.buildtool:trajectory-preview:4.5.1-1.19.
Required by:
project :
> Cannot find a version of 'dev.buildtool:trajectory-preview' that satisfies the version constraints:
Dependency path 'de.cadentem.trialanderror:Trial and Error modifications:1.0' --> 'dev.buildtool:trajectory-preview:{strictly 4.5.1-1.19_mapped_parchment_2022.11.27-1.19.2}'
Dependency path 'de.cadentem.trialanderror:Trial and Error modifications:1.0' --> 'dev.buildtool:trajectory-preview:4.5.1-1.19'
They're both there though:
Build works with just
implementation fg.deobf("dev.buildtool:trajectory-preview:${trajectoryPreview_version}:unobf")
though
I think Curse has some old version This is how you load the plugins in there right now:
static Set<PreviewProvider> previewProviders = ImmutableSet.of(new BasicPlugin());
Will you upload latest 1.19 Git build to CurseForge? It works with that
I'm sorry, it seems I fucked up and forgot to upload a version with API. Should be sorted out now,
So, have you managed to implement your thing?
Tested it again, I think the latest version is no good It's missing all previews now (and the API part is missing)
Seems like an old version as well or sth.? Entry class looks like this:
Files are from 2023-04-16
Crap, I uploaded a version for 1.19.3. but not for 1.19. I will do it on Monday.
I uploaded it, you can try again.
Working now, many thanks
Hey, I tried to create a plugin but it does not register I also cannot find the log message
Loaded and prepared {} plugin(s)
(debug or latest) even though the Main plugin is loaded / workingThe log I added is also not appearing Am I missing something?