0
votes

I am currently following this tutorial on how to make a Minecraft mod. I have done everything that he has done, but when I open Eclipse and try to open the Minecraft project it give me an error saying:

'Open Project' has encountered a problem.

The project description file(.project) for 'Minecraft' is
missing. This file contains important information about
the project. The project will not function properly until
this file is restored.

How can I fix this error so I can make my mod?

Edit: Here is the errors that I am having...
enter image description here

3
You need to give us more information for a more accurate response that being said this error message is fairly clear it's telling you that a specific required file is missing.. - suroh
like what kind of information? - user3671837
The project description file, @user3671837. Chances are if you downloaded the project from the tutorial site, he/she failed to put a required file in the project that is causing the error. Try creating a new project and porting the code over into your new project. - Evan Bechtol
Where is that located? - user3671837
@user3671837 see update to previous comment - Evan Bechtol

3 Answers

3
votes

You need to execute the command:

gradlew setupDecompWorkspace eclipse

from the commandline before you can use eclipse.

go to your start menu type in cmd

then navigate in the command prompt to your folder where you extracted the mdk

then execute in that folder the abovementioned command.

Then open eclipse and point it to the working directory(eclipse in the mdk folder)

1
votes

I'm not familiar with modding Minecraft, but from the information you've provided there are a few possible solutions. First you need to check if the .project file actually exists or if it is really missing. Go to the workspace folder as per the video and it should be in the root folder of the project in there.

If it does exist check that you have selected the correct folder for your workspace and the project. If these are wrong Eclipse might not know where to look to find the .project file.

If it does not exist you will need to create one in order to load the project. The easiest way to do this is:

  • Open Eclipse at the workspace specified in the video. I'm assuming here that you have already downloaded and extracted everything. I think the workspace is a folder named eclipse
  • Create a new project (File->New->Project). Don't try to open the broken project.
  • Navigate to the workspace in windows explorer. In here you will see a folder for the broken project and one for the new one you have just created.
  • Open the folder for the broken project and copy the entire contents.
  • Go back and open the folder for the new project. Paste everything here. Some things may be overwritten but there shouldn't be anything that causes a problem.
  • Go back to Eclipse and refresh the new project (Right click on project in left pane->Refresh)
  • You may want to rename the new project to have the same name as the old project. If you want to do that you'll have to delete the broken project.
0
votes

Did you move the anything in the Eclipse project folder after creating it?

I used to teach modding to kids and this was the most common error. If you start moving things around without right-click -> Refactor -> Move then Eclipse will become confused and could cause this error.

Another error I'd often run into is if the kid was using a parent's machine and they did not have administrative permissions OR if the internet connection was particularly slow. This caused certain files to be lost when downloaded during those cmd line commands.

Here's how I set my project up assuming you're also on windows:

  1. download forge src (looks like you're using 1.7.2)
  2. extract the contents into an empty folder
  3. point a cmd prompt to this location
  4. run "gradlew setupDecompWorkspace" (will take a while, should exit with "BUILD SUCCESS")
  5. run "gradlew eclipse" (will take a much shorter, should exit with "BUILD SUCCESS")
  6. open eclipse and switch your workspace to the "eclipse/" directory in the same folder you extracted forge into. (e.g. C:\Users\ME\Desktop\FORGE_FOLDER\eclipse)

If follow these slowly and carefully there should not be any issues. If there is then that means you may not have admin privileges or may be on a restrictive internet connection.

Edit: the package declaration issue on line one is because in your project explorer it says src/main/java/com...etc when it should be src/main/java and then that contains the package starting with "com"

To do this, right-click src/main/java/com... -> Build Path -> "Remove from build path".
After this you must drop down src, drop down main, drop down java. right-click java -> Build Path -> "Use as source folder"

Edit: easy way to access cmd in right folder is to open the folder where you extracted Forge and click in the address bar at the top of file explorer and delete what's there, type "cmd" hit enter.