Pokécube Resources

Pokécube Resources

913 Downloads

Dev Environment

Nerdpie opened this issue · 7 comments

commented

I will note that I haven't played the mod nor tried loading the project for a couple weeks, so this may be resolved; I will check after work.

I had encountered some bugs and some potential enhancements, but I, as a developer, wanted to look into them myself. For instance, the PA Bag would forget its contents (I suspect that this was fixed in a recent commit), but I wanted to throw in a few breakpoints. To that end, I:

  • Cloned the repo
  • Grabbed the Gradle folders from the Forge MDK (Chocolatey doesn't have a new enough version, unfortunately)
  • Ran the 'setupDecompWorkspace' task
  • Added the line to build.gradle for IntelliJ IDEA to inherit the output directories
  • Imported the build.gradle into IDEA
  • Ran the 'genIntellijRuns' task
  • Tried debugging the project

Unfortunately, I got errors regarding ThutCore and Pokécube Core being loaded from a separate class loader, and MC crashed. I may have to ask on the Forge forums, but I thought that I'd check how your dev environment is set up; compare notes, basically.

commented

I think that is a forge issue, everything works fine once compiled and run outside of development environments.

The workaround I used for it was to import the pokecube addons classes as additional source locations into the pokecube core workspace. I have not used IntelliJ IDEA, so idk what to do for it, but here is what I did in eclipse.
image
I then also had to add in the additional libraries in the Pokecube Addons libs folder to the build path.

for pokecube mobs, It is simple enough that I just compiled it and stuck the deobfuscated version in the mods folder of the run directory.

commented

Sorry for not following up on this; I've been distracted, which happens all too often. I'll make sure to check properly this evening. I did notice in AE2's README, they mention adding -Dfml.coreMods.load=appeng.transformer.AppEngCore to the run configs for addon devs; I wonder if something similar might work here. Again, my apologies, and I will test tonight (Eastern Time, FYI).

commented

since pokecube doesn't use any of the core mod stuff, so that wouldn't work as there is no transformer class to point to.

I brought this issue up on #minecraftforge, and noone seemed to know what was going on either,

commented

hmm, I have pokecube core done as the gradle dependancy thing. Let me see what happens if I put it in the local mods folder as well.

Edit: Nope, that doesn't work, then it just complains about duplicate mods when running in development.

commented

And again with my procrastinating... drives me nuts since I program for a living, so sorry about the overdue response. Regarding the Java flag, that's fair enough; I believe I had used that when toying with AcademyCraft and LambdaLib, so I thought that it might have made a difference. I blame the fact that we have both ASM transformer type 'core mods' and common code library 'core' mods...

Actually, another thing that AcademyCraft did was to have the LambdaLib 'installed' in the local Maven repo, and then reference it as a dependency in the build.gradle ; I wonder if something like that might work.

commented

I made this wiki page with some instructions for setting up a working development environment:

https://github.com/Thutmose/Pokecube/wiki/Development-Environment-Setup-(Eclipse---Windows)

It is for Eclipse in Windows, if you use anything else, just do whatever the equivalent steps are for whatever you use.

commented

closing this since the wiki page should address it.