ForestryMC / Binnie

Minecraft addons for the Forestry mod. Extra Bees, Extra Trees, Genetics, and more.
https://minecraft.curseforge.com/projects/binnies-mods
Other
69 stars 59 forks source link

Refactoring Modules #245

Open Nedelosk opened 7 years ago

Nedelosk commented 7 years ago

@mezz, @marcin212, @KorDum What do you think we should do ? Remove the modules and add block / item registries or make the mod modules more separate so that they no longer depend on each other.

KorDum commented 7 years ago

Ideally, all modules should be divided. But this is quite a lot of work ...

KorDum commented 7 years ago

Can we divide ExtraBees only now? This should be quite simple.

mezz commented 7 years ago

We should try but I'm not sure how to set up grade to make it all work. I think it should be possible for them to be separated mods in one workspace, and have the dependencies and everything set up with grade.

KorDum commented 7 years ago

https://github.com/BuildCraft/BuildCraft/blob/8.0.x/build.gradle Can not help us?

mezz commented 7 years ago

I think that only splits up the output jars, it would not help us keep the modules separate in code.

mezz commented 7 years ago

I am getting help from someone with better knowledge of gradle, and they will give it an attempt tomorrow. Please avoid giant refactors for a few days, it will be difficult for you to merge old changes once we split up the project.

marcin212 commented 7 years ago

https://docs.gradle.org/current/userguide/multi_project_builds.html

mezz commented 7 years ago

Yes that's exactly it. You can see the wip branch here: https://github.com/ForestryMC/Binnie/tree/wip-modules?files=1

When it's working we should probably do the same with Forestry.

mezz commented 7 years ago

Here is my plan so far:

First Half: Get the modules working in a fast dirty way.

When this first half is done we can develop on it. I am trying to do as little as possible here so that it is done more quickly.

Second half: Do it right, and get it clean.

When the second half is done we will be able to have modules disabled without fear of breaking things. Advanced players can pick only the modules they want, and our code is cleaner.

mezz commented 7 years ago

The first half is complete and was merged here: https://github.com/ForestryMC/Binnie/pull/260

Now we all can clean it up for the second half.

ferk6a commented 6 years ago

Is this being worked on?

mezz commented 6 years ago

This is mostly working right now, the modules are separate mods. The work involved with gradle to make separate jars was really inelegant and frustrating so I took a break from it. I haven't had time to work on Binnie's lately so there is no further progress.

ferk6a commented 6 years ago

Ah ok, I ran into https://github.com/ForestryMC/Binnie/issues/305 (disabling genetics makes every block and recipe still show up, albeit broken) and ended up in this bug. Thanks for the update, though, I can see how separate jars can be frustrating, so far I've only seen Charset do it right.

mezz commented 6 years ago

Yeah, asie learned from Buildcraft which is also split into jars. It's a bit easier to do when you plan the project that way from the beginning, like Charset :)