Jump to content

[Eclipse] Proper way of creating sub-mod addons etc.


SiriusWolf

Recommended Posts

Hey there, because I use 2 entirely different versions of forge this has never been an issue.

But now that I've released my 1.8 version there's things I want to add, but not as a part of the main mod.

 

Mods like TE, Mekanism, Growthcraft, etc. all have addons that require a base mod.

What is the proper way to have multiple mods and addons in a single forge copy

but only build them one at a time and be dependent?

 

I've tried fooling with the package structure and such, and even tried it the way I'd do this task in C# (VS)

but it all builds together.

a.k.a. Sirius

width=400 height=82http://i.imgur.com/QRtYi6e.png[/img]

Link to comment
Share on other sites

I am also interested in this.  I know Reika has a gradle.build file that does it for him (I've got a copy, but I can't decipher it in order to use it).

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

I am also interested in this.  I know Reika has a gradle.build file that does it for him (I've got a copy, but I can't decipher it in order to use it).

 

http://goo.gl/TSNMvo

It seems to be that bottom half that matters, directing gradle to build 3 separate libraries that all depend on 1 of them.

I've never played with the build file and didn't get it enough when I first looked at it when I began modding, but I'd really like

to be able to release the next couple of batches of stuff for my mod in parts rather than have another 5-10 config file options

the average user probably doesn't look at anyway. lol

a.k.a. Sirius

width=400 height=82http://i.imgur.com/QRtYi6e.png[/img]

Link to comment
Share on other sites

I'll have to mess around with it when I get a chance.  I haven't even looked at my code in three days.

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

This is an excellent question, and it is one of those things that some people seem to just magically know how to do... for example, I had no idea that /src/api/java/ was a special folder (it didn't even exist). I suppose it's a feature of Gradle to link those files automatically?

 

Then there's all sorts of magic that is evidently possible with build.gradle, but there are probably whole books devoted to that subject - the online documentation certainly isn't a quick read.

 

For us non-Gradle experts, it would be really nice to have a 'Gradle for Modders' information page, somewhere we can quickly learn about the most common modding-related tasks so we don't all have to become experts in Gradle and can focus instead on adding content to our mods.

Link to comment
Share on other sites

Ha, Finally its my time to shine!

 

I did this a while ago to try out the submod system. I will post some step by step instructions in a few hours.

However, when I wrote them I never intended to share them and I never really tried if everything works (looks like it does, though)

Here could be your advertisement!

Link to comment
Share on other sites

Couple things.

 

To do a task, run "gradlew [name of task]" e.g. "gradlew fullBuild"

 

You can define variables in the build.gradle file like so:

 

def libVersion = "1.3.0"
def oresVersion = "0.3.0"
def hazardsVersion = "0.2.0"
def wildlifeVersion = "0.2.0"

 

There's supposedly a way to wrap those in the build's extended properties, eg.

ext {
   mySpecialProperty = "1234"
}

But I can't seem to reference it properly (that part is fine, the reference throws a build error) per section 13.5.2.

 

I'm also getting a build failure doing the

releaseJars

task, which is responsible for renaming the zip files as jar files ("file is in use by another process") but the file is renamed correctly (as well as every other step completing successfully).  Here's the debug output:

 

12:07:25.447 [iNFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :releaseJars (Thread[main,5,main]) started.
12:07:25.454 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :releaseJars
12:07:25.454 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]
                                     Starting to execute task ':releaseJars'
12:07:25.471 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter]
                                     Determining if task ':releaseJars' is up-to-date
12:07:31.718 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]
                                     Finished executing task ':releaseJars'
12:07:31.737 [iNFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :releaseJars (Thread[main,5,main]) completed. Took 6.283 secs.
12:07:31.753 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[main,5,main]] finished, busy: 36.296 secs, idle: 0.289 secs
12:07:31.784 [ERROR] [org.gradle.BuildExceptionReporter]
12:07:31.800 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.

 

Lastly don't forget to include/exclude your assets folder(s) as needed in the from zipTree(...) section:

 

exclude 'assets/**'
include 'assets/submod1/**'
include 'assets/submod2**'
etc

 

Anyway, here's my build.gradle

http://pastebin.com/hVGQqPcr

Note that I have a few include/exclude listing based on my setup which is not exactly ideal.  I was simply taking the path of least resistance (adding the extra include/exclude line rather than moving things to new folders and having the build file move them back to where they're needed).

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

As a side note, I set up bat files to run the build commands for me, rather than using a command line (where I have to copy-paste the folder directory before I can do anything).

 

gradlew fullBuild
pause

 

The 'pause' should hold the window open (until you press any key) but I've had mixed results.  If it doesn't work, do this instead:

start /wait  fullBuild

 

It'll create a second command window, but it'll be forced to stay open after the process completes.  Either close it or type "exit"

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

Or I can double-click a batch file.  I type the command once, and bam!

width=571 height=464http://imgs.xkcd.com/comics/is_it_worth_the_time.png[/img]

I save 5 seconds, I do it about once a week, and it took me less than 21 minutes to write.

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 Slot Aster88 adalah bocoran slot rekomendasi gacor dari Aster88 yang bisa anda temukan di SLOT Aster88. Situs SLOT Aster88 hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT Aster88 terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT Aster88 merupakan SLOT Aster88 hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT Aster88. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT Aster88 hari ini yang telah disediakan SLOT Aster88. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs Aster88 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT Aster88 terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT Aster88 di link SLOT Aster88.
    • 🚀Link Daftar Klik Disini🚀 Tips Bermain Slot Bank Jago agar Meraih Maxwin dan Jackpot di MAXWINBET77 Bermain slot online Bank jago adalah cara yang seru dan mengasyikkan untuk mencari keuntungan besar di MAXWINBET77. Jika kamu ingin meningkatkan peluangmu untuk meraih maxwin dan jackpot secara terus-menerus, ada beberapa tips dan strategi yang bisa kamu terapkan. Berikut adalah panduan lengkapnya: Pilih Slot dengan RTP Tinggi: RTP (Return to Player) adalah persentase rata-rata dari total taruhan yang dikembalikan kepada pemain sebagai kemenangan. Pilihlah mesin slot Bank jago yang memiliki RTP tinggi, karena ini meningkatkan peluangmu untuk meraih kemenangan dalam jangka panjang. Kenali Fitur Bonus: Setiap slot Bank jago memiliki fitur bonus yang berbeda, seperti putaran gratis, simbol liar (wild), dan bonus game. Pelajari dengan baik fitur-fitur ini karena mereka dapat membantu meningkatkan peluang meraih kemenangan besar. Kelola Taruhan dengan Bijak: Tentukan batasan taruhan yang sesuai dengan budget dan jangan tergoda untuk bertaruh melebihi kemampuan finansialmu. Terapkan strategi taruhan yang bijak untuk memaksimalkan penggunaan saldo. Mainkan Slot Bank jago Progresif: Jika tujuanmu adalah meraih jackpot besar, coba mainkan slot Bank jago progresif di MAXWINBET77. Jackpot pada jenis slot Bank ini terus bertambah seiring dengan taruhan pemain lainnya, sehingga dapat mencapai jumlah yang sangat besar. Manfaatkan Promosi dan Bonus: MAXWINBET77 sering kali menawarkan promosi dan bonus kepada pemainnya. Manfaatkan bonus-bonus ini untuk meningkatkan peluangmu meraih kemenangan tanpa menggunakan modal tambahan. Berkonsentrasi dan Bersabar: Fokuslah saat bermain slot bank jago dan jangan terburu-buru. Bersabarlah meskipun tidak langsung mendapatkan hasil yang diharapkan. Kadang-kadang diperlukan waktu dan keberuntungan untuk mencapai maxwin atau jackpot. Baca Aturan Permainan: Sebelum bermain, pastikan untuk membaca aturan dan pembayaran pada slot Bank Jago yang dipilih. Mengetahui cara kerja mesin slot akan membantu mengoptimalkan strategi bermainmu. Dengan menerapkan tips-tips di atas dan tetap bermain secara bertanggung jawab, kamu dapat meningkatkan peluang meraih maxwin dan jackpot di Slot Bank Jago MAXWINBET77. Selamat bermain dan semoga sukses meraih kemenangan besar Anda Hari Ini.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 SLOT BCA 10K adalah bocoran slot rekomendasi gacor dari RATUASIA77 yang bisa anda temukan di SLOT BCA 10K. Situs SLOT BCA 5K hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT BSI 5K terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT BCA 10K merupakan SLOT BCA 10K hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT BSI 10K. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT BCA 10K hari ini yang telah disediakan SLOT BCA 10K. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs RATUASIA77 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT BCA 10K terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT BCA 10K di link SLOT BCA RATUASIA77.
    • 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 🤑DAFTAR & LOGIN🤑 SLOT BSI 10K adalah bocoran slot rekomendasi gacor dari RATUASIA77 yang bisa anda temukan di SLOT BSI 10K. Situs SLOT BSI 5K hari ini yang kami bagikan di sini adalah yang terbaik dan bersiaplah untuk mengalami sensasi tak terlupakan dalam permainan slot online. Temukan game SLOT BSI 5K terbaik dengan 100 pilihan provider ternama yang dipercaya akan memberikan kepuasan dan kemenangan hari ini untuk meraih x500. RTP SLOT BSI 10K merupakan SLOT BSI 10K hari ini yang telah menjadi pilihan utama bagi pemain judi online di seluruh Indonesia. Setiap harinya jutaan pemain memasuki dunia maya untuk memperoleh hiburan seru dan kemenangan besar dalam bermain slot dengan adanya bocoran RTP SLOT BSI 10K. Tidak ada yang lebih menyenangkan daripada mengungguli mesin slot dan meraih jackpot x500 yang menggiurkan di situs SLOT BSI 10K hari ini yang telah disediakan SLOT BSI 10K. Menangkan jackpot besar x500 rajanya maxwin dari segala slot dan raih kemenangan spektakuler di situs RATUASIA77 terbaik 2024 adalah tempat yang menyediakan mesin slot dengan peluang kemenangan lebih tinggi daripada situs slot lainnya. Bagi anda yang mencari pengalaman judi slot paling seru dan mendebarkan, situs bo SLOT BSI 10K terbaik 2024 adalah pilihan yang tepat. Jelajahi dunia slot online melalui situs SLOT BSI 10K di link SLOT BSI RATUASIA77.
    • DAFTAR SCATTER HITAM MAHJONG WAYS DISINI DAFTAR SCATTER HITAM MAHJONG WAYS DISINI DAFTAR SCATTER HITAM MAHJONG WAYS DISINI Mencari scatter hitam dalam permainan slot demo mahjong ways server thailand adalah salah satu jalan menuju kemenangan melalui bentuk kombinasi pola. Mengetahui bocoran pola scatter dapat meningkatkan peluang kemenangan jackpot maxwin yang cukup besar. TAG : Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam Scatter Hitam
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.