Jump to content

Recommended Posts

Posted
Downloading library from https://libraries.minecraft.net/commons-io/commons-io/2.4/commons-io-2.4.jar
java.net.UnknownHostException: libraries.minecraft.net
at java.base/sun.nio.ch.NioSocketImpl.connect(NioSocketImpl.java:560)
at java.base/java.net.SocksSocketImpl.connect(SocksSocketImpl.java:327)
at java.base/java.net.Socket.connect(Socket.java:666)
at java.base/sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:304)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:178)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:531)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:636)
at java.base/sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:264)
at java.base/sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:378)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:193)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1241)
at java.base/sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1127)
at java.base/sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:179)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1661)
at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1585)
at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:529)
at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:308)
at net.minecraftforge.installer.DownloadUtils.getConnection(DownloadUtils.java:243)
at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:184)
at net.minecraftforge.installer.DownloadUtils.download(DownloadUtils.java:174)
at net.minecraftforge.installer.DownloadUtils.downloadLibrary(DownloadUtils.java:159)
at net.minecraftforge.installer.actions.Action.downloadLibraries(Action.java:89)
at net.minecraftforge.installer.actions.ServerInstall.run(ServerInstall.java:114)
at net.minecraftforge.installer.SimpleInstaller.main(SimpleInstaller.java:128)

forge-1.19.2-43.2.4-installer, i did something wrong? i strongly believe that the problem is the minecraft site this time, but did not found anything supporting this view

Posted

In order to root out one of the more common issues, we'll need to see your hosts file. Here's the steps to getting this file.

1) Press the Win + R key on your keyboard.

2) Paste the following into the prompt that opens: notepad %windir%\system32\drivers\etc\hosts

3) Use Ctrl+A to select everything in the file, then Ctrl+C into the textbox to post to this thread.

Posted (edited)
# Standard host addresses
127.0.0.1  localhost
::1        localhost ip6-localhost ip6-loopback
ff02::1    ip6-allnodes
ff02::2    ip6-allrouters
# This host address
127.0.1.1  derick-PcManero


 

Edited by Dyp1xy
Posted (edited)
Just now, ChampionAsh5357 said:

Isn't your host address supposed to be 127.0.0.1?

i think it's because 127.0.0.1 is reserved for loopback only, gonna change it real quick and see if there's a difference

 

edit: nop, no difference, same error tho

Edited by Dyp1xy
Posted
These libraries failed to download. Try again.

com.google.code.findbugs:jsr305:3.0.2
commons-io:commons-io:2.4
There was an error during installation


both from libraries.minecraft.net

Posted
$ ping libraries.minecraft.net
ping: libraries.minecraft.net: Name or service not known

but

ping minecraft.net
PING minecraft.net (108.158.145.65) 56(84) bytes of data.
64 bytes from server-108-158-145-65.gru3.r.cloudfront.net (108.158.145.65): icmp_seq=1 ttl=247 time=11.1 ms
64 bytes from 65.145.158.108.in-addr.arpa (108.158.145.65): icmp_seq=2 ttl=247 time=11.4 ms

 

Posted (edited)

i disabled ipv6 and tried, same error, then forced ipv4 with "IPV4 is required for this connection" option, nothing changed. I strongly believe my network or my pc is causing it, gonna try it on another pc on the same network and see the result

Edited by Dyp1xy
Posted

Currently throwing this over to the discord to see if they have any new ideas since I've run out. One of them suggested seeing if your Java version is out of date (e.g. at least latest Java 8 for the launcher, but recommended Java 17 since that's what 1.19.2 uses).

Posted
Just now, ChampionAsh5357 said:

Currently throwing this over to the discord to see if they have any new ideas since I've run out. One of them suggested seeing if your Java version is out of date (e.g. at least latest Java 8 for the launcher, but recommended Java 17 since that's what 1.19.2 uses).

First thing i tried, using openjdk 19 and 8, gonna try openjdk 17 and see if there's any difference, this is kinda frustrating, i searched the error and tried a lot of things, including changing environmental variables of HOSTNAME and all, i have no idea what the fuck is the problem and already has passed 9 days (not full time trying to solve but still annoying).

Posted (edited)
Just now, Dyp1xy said:

nop, tried with openjdk 11, 17, 8 and 19, i think it could be my router for some reason blocking the connection

 

btw, it's not OS problem, i tried on the Windows i have on dual boot

Edited by Dyp1xy
Posted (edited)

Ok i have no idea what is the problem tbh, but i found a solution that i should had done earlier, i connected to a VPN and tried again, everything worked, server successfully installed.

i thought it could be regional block, but i reside in Brazil, maybe problem is the mirror?

Edited by Dyp1xy
Posted
9 minutes ago, Dyp1xy said:

i thought it could be regional block, but i reside in Brazil, maybe problem is the mirror?

Potentially? Though usually the vpn infers there's something wrong with the traffic between the two, so I don't know. You would need to verify that the network isn't the issue using a separate network before then.

  • Like 1
Posted
16 hours ago, ChampionAsh5357 said:

Potentially? Though usually the vpn infers there's something wrong with the traffic between the two, so I don't know. You would need to verify that the network isn't the issue using a separate network before then.

yeah, words cannot describe my confusion, i tested installing on a pc in my workplace, two blocks away, and works fine, my router fucked up? idk, just in case it happens to future people:

 

use a vpn to install, and stop using when you start the server.

  • 4 months later...
Posted

HI there! I know this is a dead thread, but I wanted to throw in my 2 cents since this is the thread which popped up when i searched for the issue. 

I was having this exact issue- unable to download a file via the launcher, cant ping libraries.minecraft.net, but could ping minecraft.net.

Turns out the DNS server my computer was automagically getting assigned was borked. What fixed it was:

  1. going to my 'network connections' in control panel
  2. right clicking the adapter I'm using (wifi, in my case), and selecting properties
  3. click the IPV4 property, then select the properties button
  4. In this screen, select the 'use the following DNS server addresses' radio button, then enter the following 2 DNS server IDs without the quotes
    1.      "1.1.1.1" - thats the BetterDNS IP
    2.      "8.8.8.8" - thats Google's DNS address
  5. after applying these settings, i was immediately able to ping libraries.minecraft.net, and the launcher could download all necessary files to launch mincraft, and the forge version i wanted

 

eklztwj.png0e2AVU2.png

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 know that this may be a basic question, but I am very new to modding. I am trying to have it so that I can create modified Vanilla loot tables that use a custom enchantment as a condition (i.e. enchantment present = item). However, I am having trouble trying to implement this; the LootItemRandomChanceWithEnchantedBonusCondition constructor needs a Holder<Enchantment> and I am unable to use the getOrThrow() method on the custom enchantment declared in my mod's enchantments class. Here is what I have so far in the GLM:   protected void start(HolderLookup.Provider registries) { HolderLookup.RegistryLookup<Enchantment> registrylookup = registries.lookupOrThrow(Registries.ENCHANTMENT); LootItemRandomChanceWithEnchantedBonusCondition lootItemRandomChanceWithEnchantedBonusCondition = new LootItemRandomChanceWithEnchantedBonusCondition(0.0f, LevelBasedValue.perLevel(0.07f), registrylookup.getOrThrow(*enchantment here*)); this.add("nebu_from_deepslate", new AddItemModifier(new LootItemCondition[]{ LootItemBlockStatePropertyCondition.hasBlockStateProperties(Blocks.DEEPSLATE).build(), LootItemRandomChanceCondition.randomChance(0.25f).build(), lootItemRandomChanceWithEnchantedBonusCondition }, OrichalcumItems.NEBU.get())); }   Inserting Enchantments.[vanilla enchantment here] actually works but trying to declare an enchantment from my custom enchantments class as [mod enchantment class].[custom enchantment] does not work even though they are both a ResourceKey and are registered in Registries.ENCHANTMENT. Basically, how would I go about making it so that a custom enchantment declared as a ResourceKey<Enchantment> of value ResourceKey.create(Registries.ENCHANTMENT, ResourceLocation.fromNamespaceAndPath([modid], [name])), declared in a seperate enchantments class, can be used in the LootItemRandomChanceWithEnchantedBonusCondition constructor as a Holder? I can't use getOrThrow() because there is no level or block entity/entity in the start() method and it is running as datagen. It's driving me nuts.
    • Hi here is an update. I was able to fix the code so my mod does not crash Minecraft. Please understand that I am new to modding but I honestly am having a hard time understanding how anyone can get this to work without having extensive programming and debugging experience as well as searching across the Internet, multiple gen AI bots (claude, grok, openai), and examining source code hidden in the gradle directory and in various github repositories. I guess I am wrong because clearly there are thousands of mods so maybe I am just a newbie. Ok, rant over, here is a step by step summary so others can save the 3 days it took me to figure this out.   1. First, I am using forge 54.1.0 and Minecraft 1.21.4 2. I am creating a mod to add a shotgun to Minecraft 3. After creating the mod and compiling it, I installed the .jar file to the proper directory in Minecraft and used 1.21.4-forge-54.1.0 4. The mod immediately crashed with the error: Caused by: java.lang.NullPointerException: Item id not set 5. Using the stack trace, I determined that the Exception was being thrown from the net.minecraft.world.item.Item.Properties class 6. It seems that there are no javadocs for this class, so I used IntelliJ which was able to provide a decompiled version of the class, which I then examined to see the source of the error. Side question: Are there javadocs? 7. This method, specifically, was the culprit: protected String effectiveDescriptionId() {      return this.descriptionId.get(Objects.requireNonNull(this.id, "Item id not set"));  } 8. Now my quest was to determine how to set this.id. Looking at the same source file, I determined there was another method:  public Item.Properties setId(ResourceKey<Item> pId) {             this.id = pId;             return this;   } 9. So now, I need to figure out how to call setId(). This required working backwards a bit. Starting from the constructor, I stubbed out the variable p which is of type Item.Properties public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); Rather than putting this all on one line, I split it up for readability like this: private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); Here is was the missing function, setId(), which takes a type of ResourceKey<Item>. My next problem is that due to the apparent lack of documentation (I tried searching the docs on this site) I could not determine the full import path to ResourceKey. I did some random searching on the Internet and stumbled across a Github repository which gave two clues: import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; Then I created the rk variable like this: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); And now putting it all together in order: private static ResourceKey<Item> rk = ResourceKey.create(Registries.ITEM, ResourceLocation.parse("modid:shotgunmod")); private static final Item.Properties p = new Item.Properties().useItemDescriptionPrefix().setId(rk); public static final RegistryObject<Item> SHOTGUN = ITEMS.register("shotgun", () -> new ShotgunItem(p)); This compiled and the mod no longer crashes. I still have more to do on it, but hopefully this will save someone hours. I welcome any feedback and if I missed some obvious modding resource or tutorial that has this information. If not, I might suggest we add it somewhere for people trying to write a mod that doesn't crash. Thank you !!!  
    • I will keep adding to this thread with more information in case anyone can help, or at the very least I can keep my troubleshooting organized. I decided to downgrade to 54.1.0 in the hopes that this would fix the issue but it didn't. At least now I am on a "recommended" version. The crash report did confirm my earlier post that the Exception is coming from effectiveDescriptionId(). I'll continue to see if I can find a way to set the ID manually.   Caused by: java.lang.NullPointerException: Item id not set         at java.base/java.util.Objects.requireNonNull(Objects.java:259) ~[?:?]         at TRANSFORMER/[email protected]/net.minecraft.world.item.Item$Properties.effectiveDescriptionId(Item.java:465) ~[forge-1.21.4-54.1.0-client.jar!/:?]         at TRANSFORMER/[email protected]/net.minecraft.world.item.Item.<init>(Item.java:111) ~[forge-1.21.4-54.1.0-client.jar!/:?]         at TRANSFORMER/[email protected]/com.example.shotgunmod.ShotgunItem.<init>(ShotgunItem.java:19) ~[shotgunmod-1.0.0.jar!/:1.0.0]         at TRANSFORMER/[email protected]/com.example.shotgunmod.ModItems.lambda$static$0(ModItems.java:15) ~[shotgunmod-1.0.0.jar!/:1.0.0]         at TRANSFORMER/[email protected]/net.minecraftforge.registries.DeferredRegister$EventDispatcher.lambda$handleEvent      
    • It just randomly stop working after a rebooted my dedicated server PLEASE HELP!   com.google.gson   Failed to start the minecraft server com.google.gson.JsonSyntaxException: Expected a com.google.gson.JsonObject but was com.google.gson.JsonPrimitive; at path $  
  • Topics

×
×
  • Create New...

Important Information

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