VSCode not finding files

I have forked an existing 1.8.9 minecraft forge mod and am trying to edit the code of this, when I edit the code of this exact mod in VSCode, it can find libraries which are used like
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
However when I try to create a new project myself with mostly the same code, it cannot find it. I noticed its getting the files from C:\Users\jesse\.gradle\caches\essential-loom\1.8.9\de.oceanlabs.mcp.mcp_stable.1_8_9.22-1.8.9-forge-1.8.9-11.15.1.2318-1.8.9\forge\forge-mapped.jar Does anyone know why my own project cannot find this file and why the forked version can?
28 Replies
JavaBot
JavaBot12mo ago
This post has been reserved for your question.
Hey @j_sse! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
j_sse
j_sseOP12mo ago
Image of it finding it in the forked project
No description
j_sse
j_sseOP12mo ago
image of it not finding it on my own project
No description
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
I prefer vscode for most things so if it can work in vscode Id really prefer that over any other ide
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
my edited version
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
I removed the least I had to they are basically identical just removed most comments and some files that were giving me errors When I build it and add it to my mods folder it works as expected, just vscode is not recognizing the net.minecraft and net.minecraftforge etc files
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
I dont have a setupDecompWorkspace task though neither does the forked project
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
successfully builds
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
yeah both
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
the mod works, its just vscode not recognising libraries its not recognising libraries for my project, it is recognising them in the forked version forked project, can recognise them mine, it cannot
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
yeah thats what im saying lol its just that I would like to edit the code in vscode and its nice if vscode actually recognises the libraries
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
so I dont have to guess if an attribute is a thing
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
Yeah I get that just am not sure whats the difference between the 2 projects restarted everything, deleted .vscode folders the forked project recognises the libraries again, my project doenst
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
j_sse
j_sseOP12mo ago
if anyone cares, it was as simple as adding
"java.project.referencedLibraries": [
"C:/Users/jesse/.gradle/caches/**/*.jar"
],
"java.project.referencedLibraries": [
"C:/Users/jesse/.gradle/caches/**/*.jar"
],
to my settings.json file in the .vscode folder. I swear to god I had looked in this file with the forked project when it was working and did not find something simular to this.. Anyway its working as expected now so im happy ?close
JavaBot
JavaBot12mo ago
Post Closed
This post has been closed by <@476083615000821771>.
Want results from more Discord servers?
Add your server