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

Stumped at the very first step


Recommended Posts

While I have modified Minecraft itself before, I have not used forge. I downloaded a bunch of different versions yesterday to try to get some combination that worked, and have failed.

 

I have seen the following comment by diesieben07 in another thread:

Quote

JDK 8 is recommended for modding for the time being as that is what's targeted by Mojang.

For this, I will set my path variable to jdk 8, despite updating my jdk yesterday. Path now = C:\Program Files\Java\jdk1.8.0_74\bin, among other things.

 

I have created a new and empty file at c:\[thepathtothislocation]\[username]\download\helpCenter

I have re-downloaded the recommended mdk found at this page https://files.minecraftforge.net/net/minecraftforge/forge/ 

The file forge-1.16.5-36.1.0-mdk (2).zip is now the only file in the helpCenter folder. 

I have extracted the contents of the mdk zip into the helpCenter folder.

 

Now, as a proof of concept, as something that should be absurdly simple and easy, I open command prompt as administrator. I navigate command prompt to the folder 'help center' and I issue command 'gradlew build' without changing anything in the files I have just extracted directly from the mdk I just downloaded. 

Quote

 

Microsoft Windows [Version 10.0.19041.867]
(c) 2020 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>cd C:\Users\[name]\Downloads\helpCenter

C:\Users\[name]\Downloads\helpCenter>gradlew build
To honour the JVM settings for this build a single-use Daemon process will be forked. See https://docs.gradle.org/6.8.1/userguide/gradle_daemon.html#sec:disabling_the_daemon.
Daemon will be stopped at the end of the build

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'helpCenter'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve net.minecraftforge.gradle:ForgeGradle:4.1.+.
     Required by:
         project :
      > Failed to list versions for net.minecraftforge.gradle:ForgeGradle.
         > Unable to load Maven meta-data from https://files.minecraftforge.net/maven/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml.
            > Could not get resource 'https://files.minecraftforge.net/maven/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml'.
               > Could not GET 'https://files.minecraftforge.net/maven/net/minecraftforge/gradle/ForgeGradle/maven-metadata.xml'.
                  > The server may not support the client's requested TLS protocol versions: (TLSv1.2). You may need to configure the client to allow other protocols to be used. See: https://docs.gradle.org/6.8.1/userguide/build_environment.html#gradle_system_properties
                     > sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s

C:\Users\[name]\Downloads\helpCenter>

 

I have tried what feels to me like an absurd number of things to get around this most basic hurdle.  When I enabled both TLSv1.2 and 1.3 I got an error that simply read 'TLSv1.3' with no more useful information, so I removed that line. When I attempted to download a certification through my browser and hopefully toss it in the right folder, that had no effect. When I ran the same command with the -info prefix it mentioned the following.

Quote

and when I navigated my browser to "https://repo.maven.apache.org/maven2/net/" I found that there was no "minecraftforge" folder. This resource legitimately does not exist. This is extra frustrating because there is no mention of 'maven2' anywhere in the build file, the properties file, or any other file I knew to check. I simply do not understand the keytool tool or gradlew itself well enough to even approach a solution or understand half the discourse I can find on the topics. I can't even be sure that cirtification is the real issue here. And no, changing the https to http and vice versa didn't seem to do anything, though I would be fine with going through the motions again.

 

I originally wanted to make a proof of concept for the simplest modification I could make, but at this point I'm just trying to get the program to run at all. 

Link to post
Share on other sites
Posted (edited)

found this

learned about the existence of this

Quote

gradlew -v

And it tells me I am still using jdk 1.8.74 despite the fact I have now set my path variable to C:\Program Files\Java\jdk1.8.0_291\bin and the JAVA_HOME variable to C:\Program Files\Java\jdk1.8.0_291. I also simply deleted my [username]/.gradel folder and re-ran gradel -v, and somehow it STILL wants to use 8.74 instead of 8.291 as its jvm.

I am going to delete the .gradel folder and helpcenter folder, restart my computer, and then try this again, in the hope that restarting my computer does anything. I also couldn't find any gradel.properties file inside of my .gradel folder.

Edited by d2r123
Link to post
Share on other sites
Quote

How to fix your gradle build
An internal bug with Gradle may cause you to have issues with dependencies not resolving at https://files.minecraftforge.net/maven. Please run gradlew --refresh-dependencies in a terminal inside the project to force upgrade to the latest ForgeGradle version, which fixes this issue and uses the new maven endpoint at https://maven.minecraftforge.net. It is also highly recommended to change any links in your build.gradle to use this new endpoint as well.

Link to post
Share on other sites


 

Quote

--refresh-dependencies             Refresh the state of dependencies.

How ambiguous.

Given that there is a thing in gradle which is called a dependency and my issue was with loading these dependencies, I did not think that this command referred to the JVM used by gradle. I also certainly didn't think that it referred to the encryption keys used by gradle in order to certify web downloads.

 

 

However, I still tested it. I set my classpath and javahome variables so that they pointed at 1.8.74 and then ran 'gradlew --refresh-dependencies'. This did NOT change the JVM used by gradlew. gradlew -v still returns 1.8.291. I don't think this would have solved the problem.

 

.

In summary, the solution was to download the latest version of jdk 8, but this solution failed to have any effect until the computer was restarted. I am unsure if it was strictly necessary to delete my .gradle file too, but it worked. 

And simply running the refresh dependencies command seems to have nothing to do with this, but I don't know what it actually does so maybe that would have helped if I had done that under certain circumstances. Thanks for trying. I may be back to document other very basic problems and their very basic solutions, but this is it for now.

 

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 was creating a container, and, to do this, I looked the DispenserContainer to understand the methods. So I created the container and added the slots(of container and player inventory). But, when I open the container, the item in the container slots or in the player inventory slots duplicate, and one of them its in my cursor(the image explain better). I'd like to know if its a bug or an error in the code writing. Thanks.  
    • Link died while I was in the middle of following your tutorial
    • 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?
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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