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

The import net cannot be resolved


me1
 Share

Recommended Posts

I'm just starting with minecraft modding but everywhere I go I find outdated questions and tutorials.

I made my mod projokt(eclipse) and opened the examplemod.java.

But the 'net' in import net.minecraft.... is underlined red. It sais 'The import net cannot be resolved'.

I use 1.15.2

pls help and if you can link a good modding tutorial pls!

 

Edit:I'll just use IntelliJ.It's easier to setup.

Edited by me1
i give up
Link to comment
Share on other sites

Well, that sounds like an issue with the dependencies...

Quote

README.txt
"If at any point you are missing libraries in your IDE, or you've run into problems you can run "gradlew --refresh-dependencies" to refresh the local cache. "gradlew clean" to reset everything {this does not affect your code} and then start the processs again."

 

Link to comment
Share on other sites

Quote

@Mixu_78 I've only ever used 1.12.2 so esh. But why genEclipseRuns? What if they use IntelliJ? And isn't that task for making the runs for the mod?

You can read all of this in the README.txt file in your mod directory.

Edited by Budschie
Link to comment
Share on other sites

1. Create an folder outside of your mod directory.

2. Open that folder in eclipse.

3. Choose File -> Import -> Gradle -> Existing Gradle Project -> Set the project root directory to your mod directory (not your newly created folder)

4. Click on Finish.

Link to comment
Share on other sites

1 hour ago, me1 said:

@Budschieps: I reference no librarys

Well you should because that's where all of the vanilla code lives. In your project view window there should be a place called "referenced libraries" and it should contain about 50-60 items.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • 3 months later...
  • 6 months later...

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.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • 1.7 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • I am assuming you meant the forge installer log, not sure how to get a previous install log so I ran the installer again. Log below   Launcher Screenshot(s):     Installer Log:    
    • ---- Minecraft Crash Report ---- // Why is it breaking :( Time: 26/10/21 15:07 Description: There was a severe problem during mod loading that has caused the game to fail cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: net/minecraftforge/fml/common/event/FMLInitializationEvent     at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)     at cpw.mods.fml.common.Loader.loadMods(Loader.java:544)     at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208)     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878)     at net.minecraft.client.main.Main.main(SourceFile:148)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28) Caused by: java.lang.NoClassDefFoundError: net/minecraftforge/fml/common/event/FMLInitializationEvent     at java.lang.Class.getDeclaredMethods0(Native Method)     at java.lang.Class.privateGetDeclaredMethods(Unknown Source)     at java.lang.Class.getDeclaredMethods(Unknown Source)     at cpw.mods.fml.common.FMLModContainer.gatherAnnotations(FMLModContainer.java:317)     at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:505)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)     at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)     at cpw.mods.fml.common.Loader.loadMods(Loader.java:513)     ... 10 more Caused by: java.lang.ClassNotFoundException: net.minecraftforge.fml.common.event.FMLInitializationEvent     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:191)     at java.lang.ClassLoader.loadClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     ... 37 more Caused by: java.lang.NullPointerException     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:182)     ... 39 more A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- System Details -- Details:     Minecraft Version: 1.7.10     Operating System: Windows 8.1 (amd64) version 6.3     Java Version: 1.8.0_51, Oracle Corporation     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation     Memory: 137040984 bytes (130 MB) / 369098752 bytes (352 MB) up to 2147483648 bytes (2048 MB)     JVM Flags: 9 total; -Xverify:none -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump     AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used     IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0     FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1614 Optifine OptiFine_1.7.10_HD_U_E7 11 mods loaded, 11 mods active     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored     UC    mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)      UC    FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1614-1.7.10.jar)      UC    Forge{10.13.4.1614} [Minecraft Forge] (forge-1.7.10-10.13.4.1614-1.7.10.jar)      UC    perspectivemod{3.0} [Perspective Mod 3.0] (minecraft.jar)      UC    PlayerAPI{1.4} [Player API] (minecraft.jar)      UC    clearglassmod{1.0} [Clear Glass Mod] ([1.7.10] Clearglass Mod.jar)      UC    Powns' CheatbreakerHud{1.0} [Powns' CheatbreakerHud] ([1.7.10] Powns CheatbreakerHud - 1.0.jar)      UE    reachdisplaymod{1.0} [Reach Display Mod] ([1.7.10] ReachDisplayMod-1.0.jar)      UC    sidebarmod{2.0} [Sidebar Mod Revamp] ([1.7.10] Sidebar Mod Revamp.jar)      UC    timechanger{1.0} [TimeChanger] ([1.7.10] TimeChanger-1.0.jar)      UC    pownstogglesneak{3.0} [pownstogglesneak] ([1.7.10] ToggleSneak-3.0.jar)      GL info: ' Vendor: 'Intel' Version: '4.0.0 - Build 10.18.10.4276' Renderer: 'Intel(R) HD Graphics 4000'
    • I removed it from the Applications Folder.   I then deleted everything I can find minecraft related from ~/Library/Application Support/minecraft  ~/Library/Caches ~/Library/Preferences ~/Library/Saved Application State
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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