Development Environment Setup (Eclipse Windows) - Thutmose/Pokecube GitHub Wiki

Here are instructions for setup of development environment for eclipse, in windows.

Step 1 - Download Git Repository:

Clone the Pokecube Repository somewhere. For this, I use the eclipse built-in Git manager.

The git repositories view in eclipse can be opened by clicking "Window", then "Show View", then "Other", or by pressing Alt-Shift-Q then Q

Once it is open, click Clone a Git repository, and paste "https://github.com/Thutmose/Pokecube.git" into the URI field, then press next, select the branches you want to work on, then press next again, and confirm that it is saving to where you want it, make note of where it saves to, that location will be refered to as the "Pokecube Directory" for the rest of this page.

Press finish to finish the clone, this might take a while, depending on your download speed.

Step 2 - Download and setup MinecraftForge development environment:

Due to a bug in forge, for running pokecube addons in eclipse development mode, the source must be in the buildpath, rather than using a compiled library jar, and a compiled library jar is needed to actually compile the addon.

For this reason, the forge development environment needs to be setup primarily for Core, and then have the source for the addon added as an external source folder.

To setup the development environment for core, download one of the MDK packs from http://files.minecraftforge.net/maven/net/minecraftforge/forge (which one generally does not matter), then extract it somewhere other than the Pokecube Directory.

From the MDK, move only gradlew.bat, the eclipse directory and the gradle directory into Pokecube Directory/Pokecube Core*

Your contents of Pokecube Directory/Pokecube Core* should look like this:

Then, either run the setuppokecubecore.bat in the Pokecube Directory, or, in command prompt opened in the Pokecube Directory/Pokecube Core* directory, run "gradlew setupDecompWorkspace eclipse".

This should download and setup the forge development environment, Ensure this finishes before moving onto step 3.

*For setting up Addons, Mobs, or your own custom addon for compiling, repeat this step, and replace "Pokecube Core" with the corresponding directory.

Step 3 - Import generated project into eclipse:

In eclipse, click File, then Import, then under General, select Existing Projects into Workspace.

Then click browse, and find the Pokecube Directory, and click on it.

It should locate a project called "Pokecube Core" (as well as Addons, Mobs or your custom addon, if you also did Step 2 for them)

Click Finish, and it should add it to the workspace.

The view under eclipse Package Explorer should look something like this:

Next, Click Run, then select Debug Configurations, and under Java Application, select Pokecube Core_Client.

I suggest then selecting Arguments, and adding --username to the Program arguments, to ensure that your username is the same every time you run it.

Click Debug in the lower right of the Debug Configurations window. This step is to generate the needed folders for the next step.

Step 4 - make a development resourcepack to include the mobs:

in Pokecube Directory/Pokecube Core/run/resourcepacks, make a new folder, I will name it "Pack", the name is mostly irrelevant.

In pack, make a file called "pack.mcmeta", and put the following in it:

{ "pack": { "pack_format": 1, "description": "Pokemob Models for Pokecube" } }

Next, download Pokecube Mobs. (It can be found Here) Extract Pokecube Mobs somewhere other than the Pokecube Directory/Pokecube Core/run/resourcepacks/Pack, and move the assets folder in it to Pokecube Directory/Pokecube Core/run/resourcepacks/Pack

Your Pokecube Directory/Pokecube Core/run/resourcepacks/Pack directory should now contain a file called "pack.mcmeta", and a folder called "assets"

Open assets, and rename the folder called "pokecube_mobs" to "pokecube_ml". This is done as without the Pokecube Mobs mod, Pokecube will only look for resources under "pokecube_ml".

Run the debug/run configuration, it should take longer this time, and show loading bars related to XML overrides and pokemon.

Once minecraft loads, select Options, then Resource Packs, then apply the resourcepack Pack. You can then try creating a new world, to confirm that things applied correctly, if they did, you should be presented with the Choose First gui, and it should contain all of the standard starters.

Step 5 - How to link source to Addons or custom Addon.

If you followed step 2 for additional locations other than Pokecube Core, then you will need to link their source to the Pokecube Core project.

This example will be for Pokecube Addons source.

In eclipse, in the Package Explorer view, Right click the Pokecube Core project, and select properties.

Then select Java Build Path and click Link Source Click Browse, then locate the src folder for addons, it should be located at Pokecube Directory/Pokecube Addons/src Expand that, and select Pokecube Directory/Pokecube Addons/src/main/java, then click OK.

In the Folder name: field, I suggest changing java to addons-java, or something similar, incase you wish to add more source folders, to make it easier to differentiate it.

The link Source window should look something like this:

Where the red blot is Pokecube Directory, Click finish.

Repeat this for the resources directory inside Pokecube Directory/Pokecube Addons/src/main

Then click Apply, and OK in the Properties for Pokecube Core window.

Your Project should now look something like this:

Note any errors.

If you are including the official Addons, then there will be some remaining errors under the pokecube.compat package. These can most likely be ignored, as they are mod-compatibility things. If you wish to make the errors go away, you will need to include all of the required libraries for Addons in your build path as well.

⚠️ **GitHub.com Fallback** ⚠️