admin管理员组

文章数量:1404922

When I used:

'dev.architectury.loom' version '1.7-SNAPSHOT`
'architectury-plugin' version '3.4-SNAPSHOT'
'faric-loom' version '1.9-SNAPSOT'

with Gradle version 8.11/.13 ,but the build was not completed due to many errors. I had tried to work with Gradle 8.8, but the other problem came then.

The second problem is the Fabric DataGen method in build.grardle. It does not generate any jsons, because the method wants to work in the SERVER side.

How do I fix both problems?

Here is the first problem's code in (:common)

plugins {
    id 'dev.architectury.loom' version '1.7-SNAPSHOT' apply false
    id 'architectury-plugin' version '3.4-SNAPSHOT'
    id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
}

...

allprojects {
    group = rootProject.maven_group
    version = rootProject.mod_version
}

subprojects {
    apply plugin: 'dev.architectury.loom'
    apply plugin: 'architectury-plugin'
    apply plugin: 'maven-publish'

    base {
        // Set up a suffixed format for the mod jar names, e.g. `example-fabric`.
        archivesName = "$rootProject.archives_name-$project.name"
    }

...

    dependencies {
        minecraft "net.minecraft:minecraft:$rootProject.minecraft_version"
        mappings loom.layered {
            it.mappings("net.fabricmc:yarn:$rootProject.yarn_mappings:v2")
            it.mappings("dev.architectury:yarn-mappings-patch-neofe:$rootProject.yarn_mappings_patch_neofe_version")
        }
    }
...

error caused

A problem occurred evaluating root project 'double_edged_enchantments'.
> Failed to apply plugin 'dev.architectury.loom'.
   > Could not create an instance of type net.fabricmc.loom.extension.LoomGradleExtensionImpl.
      > Could not create an instance of type net.fabricmc.loom.extension.LoomProblemReporter.
         > '.gradle.api.problems.ProblemReporter .gradle.api.problems.Problems.forNamespace(java.lang.String)'

secound problem

id "fabric-loom" version '1.9-SNAPSHOT'

error cuased

A problem occurred configuring project ':fabric'.
> Could not resolve all artifacts for configuration ':fabric:classpath'.
   > Could not resolve net.fabricmc:fabric-loom:1.9-SNAPSHOT.
     Required by:
         project :fabric > fabric-loom:fabric-loom.gradle.plugin:1.9-SNAPSHOT:20241202.180306-2
      > Plugin net.fabricmc:fabric-loom:1.9-SNAPSHOT:20241202.180306-2 requires at least Gradle 8.11. This build uses Gradle 8.8.

third error (When the secound problem's code is deleted)

Caused by: java.lang.RuntimeException: Cannot load class name_space.fabric.client.DEE_FabricDataGen in environment type SERVER

I did try to to use fabric-loom 1.10, but the same problems are there...

I just to make the DataGen work in the architectury API / Template in 1.21.4.

本文标签: javaArchitecturyFabric amp Gradle not working togetherStack Overflow