Jump to content

Recommended Posts

Posted

Hello guys, I am currently upgrading my Minecraft to 1.21. It was originally 1.20.1, but after replacing the laptop, I am unable to download the dependencies. This is a problem that has never occurred before, and I cannot find the problem. Please help me!
 

# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
# This is required to provide enough memory for the Minecraft decompilation process.
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

forge_version=51.0.18
jei_version=19.0.0.11
jade_id=5072729
mixin_version=0.8.5
patchouli=84-FORGE
geckolib=4.5.6

# The Minecraft version must agree with the Forge version to get a valid artifact
minecraft_version=1.21
minecraft_version_range=[1.21,1.22)
# The Forge version range can use any version of Forge as bounds or match the loader version range
forge_version_range=[0,)
# The loader version range can only use the major version of Forge/FML as bounds
loader_version_range=[0,)
# The mapping channel to use for mappings.
# The default set of supported mapping channels are ["official", "snapshot", "snapshot_nodoc", "stable", "stable_nodoc"].
# Additional mapping channels can be registered through the "channelProviders" extension in a Gradle plugin.
#
# | Channel   | Version              |                                                                                |
# |-----------|----------------------|--------------------------------------------------------------------------------|
# | official  | MCVersion            | Official field/method names from Mojang mapping files                          |
# | parchment | YYYY.MM.DD-MCVersion | Open community-sourced parameter names and javadocs layered on top of official |
#
# You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
# See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
#
# Parchment is an unofficial project maintained by ParchmentMC, separate from Minecraft Forge.
# Additional setup is needed to use their mappings, see https://parchmentmc.org/docs/getting-started
mapping_channel=parchment
# The mapping version to query from the mapping channel.
# This must match the format required by the mapping channel.
mapping_version=2024.06.23-1.21
mod_id=chinacraft
# The human-readable display name for the mod.
mod_name=ChinaCraft
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=All Rights Reserved
# The mod version. See https://semver.org/
mod_version=1.21-3.0.0
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
mod_group_id=ocean.spring.chinacraft
# The authors of the mod. This is a simple text string that is used for display purposes in the mod list.
mod_authors=Spring
# The description of the mod. This is a simple multiline text string that is used for display purposes in the mod list.
mod_description=中国风Mod,以中国传统的食物、武器、盔甲、工具、神化元素为主内容的中国特色主义模组。


 

pluginManagement {
    repositories {
        gradlePluginPortal()
        maven {
            name = 'MinecraftForge'
            url = 'https://maven.minecraftforge.net/'
        }
        maven { url = 'https://maven.parchmentmc.org' }
        maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
    }
}

plugins {
    id 'org.gradle.toolchains.foojay-resolver-convention' version '0.7.0'
}
plugins {
    id 'eclipse'
    id 'idea'
    id 'maven-publish'
    id 'net.minecraftforge.gradle' version '[6.0.24,6.2)'
    id 'org.parchmentmc.librarian.forgegradle' version '1.+'
}

version = mod_version
group = mod_group_id

base {
    archivesName = mod_id
}

// Mojang ships Java 21 to end users in 1.20.5+, so your mod should target Java 21.
java.toolchain.languageVersion = JavaLanguageVersion.of(21)

println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
minecraft {
    // The mappings can be changed at any time and must be in the following format.
    // Channel:   Version:
    // official   MCVersion             Official field/method names from Mojang mapping files
    // parchment  YYYY.MM.DD-MCVersion  Open community-sourced parameter names and javadocs layered on top of official
    //
    // You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
    // See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
    //
    // Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
    // Additional setup is needed to use their mappings: https://parchmentmc.org/docs/getting-started
    //
    // Use non-default mappings at your own risk. They may not always work.
    // Simply re-run your setup task after changing the mappings to update your workspace.
    mappings channel: mapping_channel, version: mapping_version
//    mappings channel: 'parchment', version: '2024.04.16-1.20.6'

    // Tell FG to not automtically create the reobf tasks, as we now use Official mappings at runtime, If you don't use them at dev time then you'll have to fix your reobf yourself.
    reobf = false

    // When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game.
    // In most cases, it is not necessary to enable.
    // enableEclipsePrepareRuns = true
    // enableIdeaPrepareRuns = true

    // This property allows configuring Gradle's ProcessResources task(s) to run on IDE output locations before launching the game.
    // It is REQUIRED to be set to true for this template to function.
    // See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
    copyIdeResources = true

    // When true, this property will add the folder name of all declared run configurations to generated IDE run configurations.
    // The folder name can be set on a run configuration using the "folderName" property.
    // By default, the folder name of a run configuration is the name of the Gradle project containing it.
    // generateRunFolders = true

    // This property enables access transformers for use in development.
    // They will be applied to the Minecraft artifact.
    // The access transformer file can be anywhere in the project.
    // However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge.
    // This default location is a best practice to automatically put the file in the right place in the final jar.
    // See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information.
    // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

    // Default run configurations.
    // These can be tweaked, removed, or duplicated as needed.
    runs {
        // applies to all the run configs below
        configureEach {
            workingDirectory project.file('run')

            // Recommended logging data for a userdev environment
            // The markers can be added/remove as needed separated by commas.
            // "SCAN": For mods scan.
            // "REGISTRIES": For firing of registry events.
            // "REGISTRYDUMP": For getting the contents of all registries.
            property 'forge.logging.markers', 'REGISTRIES'

            // Recommended logging level for the console
            // You can set various levels here.
            // Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
            property 'forge.logging.console.level', 'debug'
        }

        client {
            // Comma-separated list of namespaces to load gametests from. Empty = all namespaces.
            property 'forge.enabledGameTestNamespaces', mod_id
        }

        server {
            property 'forge.enabledGameTestNamespaces', mod_id
            args '--nogui'
        }

        // This run config launches GameTestServer and runs all registered gametests, then exits.
        // By default, the server will crash when no gametests are provided.
        // The gametest system is also enabled by default for other run configs under the /test command.
        gameTestServer {
            property 'forge.enabledGameTestNamespaces', mod_id
        }

        data {
            // example of overriding the workingDirectory set in configureEach above
            workingDirectory project.file('run-data')

            // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
            args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
        }
    }
}

// Include resources generated by data generators.
sourceSets.main.resources { srcDir 'src/generated/resources' }

repositories {
    maven {
        // location of the maven that hosts JEI files
        name = "Progwml6 maven"
        url = "https://dvs1.progwml6.com/files/maven/"
    }
    maven {
        // location of a maven mirror for JEI files, as a fallback
        name = "ModMaven"
        url = "https://modmaven.dev"
    }
    maven {
        url "https://www.cursemaven.com"
        content {
            includeGroup "curse.maven"
        }
    }
    maven {
        name = 'GeckoLib'
        url 'https://dl.cloudsmith.io/public/geckolib3/geckolib/maven/'
        content {
            includeGroup("software.bernie.geckolib")
        }
    }
    maven {
        // location of the maven that hosts JEI files since January 2023
        name = "Jared's maven"
        url = "https://maven.blamejared.com/"
    }
}

dependencies {
    minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"

    // compile against the JEI API but do not include it at runtime
    compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-common-api:${jei_version}"))
    compileOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge-api:${jei_version}"))
    // at runtime, use the full JEI jar for Forge
    runtimeOnly(fg.deobf("mezz.jei:jei-${minecraft_version}-forge:${jei_version}"))

//    implementation fg.deobf("curse.maven:jade-324717:${jade_id}")
    annotationProcessor "org.spongepowered:mixin:${mixin_version}:processor"
    compileOnly fg.deobf("vazkii.patchouli:Patchouli:${minecraft_version}-${patchouli}:api")
    runtimeOnly fg.deobf("vazkii.patchouli:Patchouli:${minecraft_version}-${patchouli}")
    implementation fg.deobf("software.bernie.geckolib:geckolib-forge-${minecraft_version}:${geckolib}")
    implementation('net.sf.jopt-simple:jopt-simple:5.0.4') { version { strictly '5.0.4' } }
}

// This block of code expands all declared replace properties in the specified resource targets.
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
tasks.named('processResources', ProcessResources).configure {
    var replaceProperties = [
            minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
            forge_version: forge_version, forge_version_range: forge_version_range,
            loader_version_range: loader_version_range,
            mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
            mod_authors: mod_authors, mod_description: mod_description,
    ]
    inputs.properties replaceProperties

    filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
        expand replaceProperties + [project: project]
    }
}

// Example for how to get properties into the manifest for reading at runtime.
tasks.named('jar', Jar).configure {
    manifest {
        attributes([
                'Specification-Title'     : mod_id,
                'Specification-Vendor'    : mod_authors,
                'Specification-Version'   : '1', // We are version 1 of ourselves
                'Implementation-Title'    : project.name,
                'Implementation-Version'  : project.jar.archiveVersion,
                'Implementation-Vendor'   : mod_authors
        ])
    }
}

// Example configuration to allow publishing using the maven-publish plugin
publishing {
    publications {
        register('mavenJava', MavenPublication) {
            artifact jar
        }
    }
    repositories {
        maven {
            url "file://${project.projectDir}/mcmodsrepo"
        }
    }
}

tasks.withType(JavaCompile).configureEach {
    options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}

eclipse {
    // Run everytime eclipse builds the code
    //autoBuildTasks genEclipseRuns
    // Run when importing the project
    synchronizationTasks 'genEclipseRuns'
}

// Merge the resources and classes into the same directory.
// This is done because java expects modules to be in a single directory.
// And if we have it in multiple we have to do performance intensive hacks like having the UnionFileSystem
// This will eventually be migrated to ForgeGradle so modders don't need to manually do it. But that is later.
sourceSets.each {
    def dir = layout.buildDirectory.dir("sourcesSets/$it.name")
    it.output.resourcesDir = dir
    it.java.destinationDirectory = dir
}



 

Posted

Could not find mezz.jei:jei-1.21-common-api:19.0.0.11_mapped_parchment_2024.06.23-1.21.
Searched in the following locations:
  - file:/E:/.gradle/caches/forge_gradle/bundled_deobf_repo/mezz/jei/jei-1.21-common-api/19.0.0.11_mapped_parchment_2024.06.23-1.21/jei-1.21-common-api-19.0.0.11_mapped_parchment_2024.06.23-1.21.pom
  - file:/E:/.gradle/caches/forge_gradle/bundled_deobf_repo/mezz/jei/jei-1.21-common-api/19.0.0.11_mapped_parchment_2024.06.23-1.21/jei-1.21-common-api-19.0.0.11_mapped_parchment_2024.06.23-1.21.jar
Required by:
    project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

 

Could not find software.bernie.geckolib:geckolib-forge-1.21:4.5.6_mapped_parchment_2024.06.23-1.21.
Searched in the following locations:
  - file:/E:/.gradle/caches/forge_gradle/bundled_deobf_repo/software/bernie/geckolib/geckolib-forge-1.21/4.5.6_mapped_parchment_2024.06.23-1.21/geckolib-forge-1.21-4.5.6_mapped_parchment_2024.06.23-1.21.pom
  - file:/E:/.gradle/caches/forge_gradle/bundled_deobf_repo/software/bernie/geckolib/geckolib-forge-1.21/4.5.6_mapped_parchment_2024.06.23-1.21/geckolib-forge-1.21-4.5.6_mapped_parchment_2024.06.23-1.21.jar
Required by:
    project :

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html



Don't worry about anything else, I know not, it's just these two

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I just tried installing Forge version 1.21.3, and tried launching it with no mods installed. It loads, and immediately crashes while "loading bootstrap resourses." Does anyone know a fix for this? My Java is up to date, as well as my graphics drivers. Here's a snip right before it crashes: https://imgur.com/a/elLujPj
    • I know this is a forge only place, but just to be clear, my error is in Fabric I was actually super frustrated while trying to fix this, like this mod does work when I play it by launching it in minecraft, but when I was trying to install it onto the server it just kept crashing so I decided to delete every mod I've got but kept the bewitchment mod and the necessary mod it needs to function and I tried to run the server... But it somehow still crashed, and the thing is that I really do want the bewitchment mod to be in the SMP so it'll be SUPER helpful if anyone can figure out on how to fix this: It didn't give me any "crash-reports" so I'll be sending the logs and what the console said: Console: [18:51:46] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/home/container/libraries/net/fabricmc/sponge-mixin/0.13.3+mixin.0.8.5/sponge-mixin-0.13.3+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER [18:51:46] [main/WARN]: Error loading class: io/github/apace100/origins/power/PreventItemUsePower (java.lang.ClassNotFoundException: io/github/apace100/origins/power/PreventItemUsePower) [18:51:46] [main/WARN]: @Mixin target io.github.apace100.origins.power.PreventItemUsePower was not found bewitchment.mixins.json:integration.origins.PreventItemUsePowerMixin from mod bewitchment [18:51:47] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.3.5). [18:51:52] [main/FATAL]: Failed to start the minecraft server java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'bewitchment'! at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:388) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:386) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63) ~[fabric-loader-0.15.11.jar:?] at net.minecraft.server.Main.main(Main.java:92) [server-intermediary.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.15.11.jar:?] at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) [server.jar:1.0.1] Caused by: java.lang.NoSuchFieldError: TEXTURE at moriyashiine.bewitchment.common.item.SpecterBangleItem.<clinit>(SpecterBangleItem.java:28) ~[bewitchment-1.16.5-18.jar:?] at moriyashiine.bewitchment.common.registry.BWObjects.<clinit>(BWObjects.java:272) ~[bewitchment-1.16.5-18.jar:?] at moriyashiine.bewitchment.common.Bewitchment.onInitialize(Bewitchment.java:221) ~[bewitchment-1.16.5-18.jar:?] at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384) ~[fabric-loader-0.15.11.jar:?] ... 7 more Logs: https://mclo.gs/wSsqMfn
    • I know this is a forge only place, but just so you know my error is in Fabric I was actually super frustrated while trying to fix this, like this mod does work when I play it by launching it in minecraft, but when I was trying to install it onto the server it just kept crashing so I decided to delete every mod I've got but kept the bewitchment mod and the necessary mod it needs to function and I tried to run the server... But it somehow still crashed, and the thing is that I really do want the bewitchment mod to be in the SMP so it'll be SUPER helpful if anyone can figure out on how to fix this: It didn't give me any "crash-reports" so I'll be sending the logs and what the console said: Console: [18:51:46] [main/INFO]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=file:/home/container/libraries/net/fabricmc/sponge-mixin/0.13.3+mixin.0.8.5/sponge-mixin-0.13.3+mixin.0.8.5.jar Service=Knot/Fabric Env=SERVER [18:51:46] [main/WARN]: Error loading class: io/github/apace100/origins/power/PreventItemUsePower (java.lang.ClassNotFoundException: io/github/apace100/origins/power/PreventItemUsePower) [18:51:46] [main/WARN]: @Mixin target io.github.apace100.origins.power.PreventItemUsePower was not found bewitchment.mixins.json:integration.origins.PreventItemUsePowerMixin from mod bewitchment [18:51:47] [main/INFO]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.3.5). [18:51:52] [main/FATAL]: Failed to start the minecraft server java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'bewitchment'! at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:388) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:386) ~[fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63) ~[fabric-loader-0.15.11.jar:?] at net.minecraft.server.Main.main(Main.java:92) [server-intermediary.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69) [fabric-loader-0.15.11.jar:?] at net.fabricmc.installer.ServerLauncher.main(ServerLauncher.java:69) [server.jar:1.0.1] Caused by: java.lang.NoSuchFieldError: TEXTURE at moriyashiine.bewitchment.common.item.SpecterBangleItem.<clinit>(SpecterBangleItem.java:28) ~[bewitchment-1.16.5-18.jar:?] at moriyashiine.bewitchment.common.registry.BWObjects.<clinit>(BWObjects.java:272) ~[bewitchment-1.16.5-18.jar:?] at moriyashiine.bewitchment.common.Bewitchment.onInitialize(Bewitchment.java:221) ~[bewitchment-1.16.5-18.jar:?] at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384) ~[fabric-loader-0.15.11.jar:?] ... 7 more Logs: https://mclo.gs/wSsqMfn
    • Open the Task Manager and check the Performance Tab At GPU the GPU is mentioned above the Graph
    • how? and how do i find what graphics card i have
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.