Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Gradle cannot build in IntelliJ due to it not finding the Forge files (apparently)


Recommended Posts

Hi there!

I've recently been starting out with mod programming in Minecraft. As a version i chose 1.16.5 and downloaded the appropriate Forge MDK. I followed the wiki and ran

gradlew genIntellijRuns

 

After that I tried to start the game and got the following error message in in the "Build Output" tab:

Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not find net.minecraftforge:forge:1.16.5-36.1.4_mapped_official_1.16.5.
     Searched in the following locations:
       - https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.16.5-36.1.4_mapped_official_1.16.5/forge-1.16.5-36.1.4_mapped_official_1.16.5.module
       - https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.16.5-36.1.4_mapped_official_1.16.5/forge-1.16.5-36.1.4_mapped_official_1.16.5.pom
       - https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.16.5-36.1.4_mapped_official_1.16.5/forge-1.16.5-36.1.4_mapped_official_1.16.5.jar
       - file:/C:/Users/nbste/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.16.5-36.1.4_mapped_official_1.16.5/forge-1.16.5-36.1.4_mapped_official_1.16.5.pom
       - file:/C:/Users/nbste/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.16.5-36.1.4_mapped_official_1.16.5/forge-1.16.5-36.1.4_mapped_official_1.16.5.jar
       - https://libraries.minecraft.net/net/minecraftforge/forge/1.16.5-36.1.4_mapped_official_1.16.5/forge-1.16.5-36.1.4_mapped_official_1.16.5.jar
       - https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.16.5-36.1.4_mapped_official_1.16.5/forge-1.16.5-36.1.4_mapped_official_1.16.5.pom
     Required by:
         project :

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

I unfortunately do not understand how to transfer the solutions from the "Possible Solutions" link to my own problem. It is also noticeable that in the ExampleMod class minecraft, minecraftforge.common, minecraftforge.event, minecraftforge.eventbus, minecraftforge.fml and apache.logging aren't found and therefore are red.

I hope I provided enough information for you to be able to give me a hint or to give me a solution to the problem. If anything is still needing for proper understanding, I will be determined to provide it.

Thanks in advance,

EinSteini

Edited by EinSteini
spelling
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
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.



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • I think I've found the cause of the problem.  A recently updated Java installation installed just the JRE instead of the JDK, and was causing gradle to be unable to find tools.jar.  Installing the updated version of the JDK seems to have fixed the problem.  Thank you, and I apologize for wasting your time.
    • Send me examples with entities if u have ^^
    • Minecraft 1.16.5 Forge latest  This is my /data/forge/loot_modifiers/global_loot_modifiers.json  { "replace": false, "entries": [ "multimod:blaze_loot" ] }   This my /data/multimod/loot_modifiers/blaze_loot.json (serialized json) { "conditions": [ { "condition": "minecraft:killed_by_player" }, { "condition": "minecraft:entity_properties", "predicate": { "type": "minecraft:blaze" }, "entity": "this" } ] }   and now I want that the Entity Blaze can drop my custom item (custom_item) in this GlobalLotModifiers.java package com.squidxtv.multimod.core.init; import com.google.gson.JsonObject; import net.minecraft.item.ItemStack; import net.minecraft.loot.LootContext; import net.minecraft.loot.conditions.ILootCondition; import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.loot.GlobalLootModifierSerializer; import net.minecraftforge.common.loot.LootModifier; import javax.annotation.Nonnull; import java.util.List; public class GlobalLootModifiers extends LootModifier { /** * Constructs a LootModifier. * * @param conditionsIn the ILootConditions that need to be matched before the loot is modified. */ protected GlobalLootModifiers(ILootCondition[] conditionsIn) { super(conditionsIn); } @Nonnull @Override public List<ItemStack> doApply(List<ItemStack> generatedLoot, LootContext context) { return null; } private static class Serializer extends GlobalLootModifierSerializer<GlobalLootModifiers> { @Override public GlobalLootModifiers read(ResourceLocation location, JsonObject object, ILootCondition[] ailootcondition) { return null; } @Override public JsonObject write(GlobalLootModifiers instance) { return null; } } } but how can I do this?
    • I tried to found debug.log, but I can't found that, would you tell me about the location of the debug.log?
    • 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.