Jump to content

One Forge, multiple mods


Kokkie

Recommended Posts

I'm not really sure what you're asking. Yes, you can have as many versions as you want, just in separate directories. However, this will consume a considerable amount of storage space. If you're wanting the same Forge version , but with multiple mods, then this tutorial from Lex Manos should serve you well:

 

 

  • Like 2

Website: jdawg3636.com
Discord: discord.gg/EKeM7Jz

Link to comment
Share on other sites

33 minutes ago, Kokkie said:

But, don't you still have multiple of the same Minecraft files for each project in there?

From my understanding, due to the way Gradle works, the file size should be GREATLY reduced. However, there are obviously still going to be some mod-specific files. To the best of my knowledge, there's no way around that. At the very least this should make it easier to MANAGE all of those mods.

Website: jdawg3636.com
Discord: discord.gg/EKeM7Jz

Link to comment
Share on other sites

Ok so I did about what the tutorial did (some different things for newer version), but there are some things.

First, I can't look at Forge code because it doesn't have a source attached, how can I attach the source?

Second, when I run the game it crashes.

Spoiler

[18:48:36] [main/ERROR]: Unable to launch
java.lang.RuntimeException: java.lang.NullPointerException
    at net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper.injectIntoClassLoader(CoreModManager.java:169) ~[forgeBin-1.12-14.21.1.2443.jar:?]
    at net.minecraft.launchwrapper.Launch.launch(Launch.java:115) [launchwrapper-1.12.jar:?]
    at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
Caused by: java.lang.NullPointerException
    at LZMA.LzmaInputStream.readHeader(LzmaInputStream.java:246) ~[lzma-0.0.1.jar:?]
    at LZMA.LzmaInputStream.<init>(LzmaInputStream.java:65) ~[lzma-0.0.1.jar:?]
    at net.minecraftforge.fml.common.asm.transformers.deobf.LZMAInputSupplier.openStream(LZMAInputSupplier.java:40) ~[forgeBin-1.12-14.21.1.2443.jar:?]
    at com.google.common.io.ByteSource$AsCharSource.openStream(ByteSource.java:456) ~[guava-21.0.jar:?]
    at com.google.common.io.CharSource.openBufferedStream(CharSource.java:107) ~[guava-21.0.jar:?]
    at com.google.common.io.CharSource.readLines(CharSource.java:276) ~[guava-21.0.jar:?]
    at net.minecraftforge.fml.common.asm.transformers.deobf.FMLDeobfuscatingRemapper.setup(FMLDeobfuscatingRemapper.java:134) ~[forgeBin-1.12-14.21.1.2443.jar:?]
    at net.minecraftforge.fml.common.asm.FMLSanityChecker.injectData(FMLSanityChecker.java:188) ~[forgeBin-1.12-14.21.1.2443.jar:?]
    at net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper.injectIntoClassLoader(CoreModManager.java:164) ~[forgeBin-1.12-14.21.1.2443.jar:?]
    ... 2 more

I think this has something to do with the arguments I specified.

Program args: --version 1.8 --tweakClass net.minecraftforge.fml.common.launcher.FMLTweaker --username * --password *

VM args: -DFORGE_FORCE_FRAME_RECALC=true -Dfml.ignoreInvalidMinecraftCertificate=true

And I changed the run dir to ${workspace_loc}\Run.

Any help would be welcome.

Edited by Kokkie

Classes: 94

Lines of code: 12173

Other files: 206

Github repo: https://github.com/KokkieBeer/DeGeweldigeMod

Link to comment
Share on other sites

I never got multi-mod installations to work, so I gave up long ago. Instead, I copy files (gradle, java, resources) in and out of my workspace so there's only one mod at a time inside. I keep the master copies in a nearby folder. Eclipse never seems to mind the fact that all its source code sometimes changes under its feet. It sounds tedious, but I've swapped mods so enough times now that I can do it in under 30 seconds, which isn't much trouble for something I do only a few times per month.

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

The 'gradle' projects ARE already designed to have 'one forge' and multiple mods. All the Forge asses code and data are kept in a single gradle cache folder in your user directory.

Things are not duplicated unless they need to be by your setup.

You don't have to do anything special.

 

If you want to run multiple mods at once in the same IDE, just make one mod depend on the other in the IDE and you're fine. Simple as that.

  • Like 1

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

Actually, No the thing that takes up 'the most space' is the entire assets needed to run the game. But those are only downloaded once into your cache folder. So you should eb fine.

But overall we're talking <500MB so.. whats the issue?

  • Like 1

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

from the official docs:

 

Quote
  1. Obtain a source distribution from forge’s files site. (Look for the Mdk file type, or Src in older 1.8/1.7 versions).
  2. Extract the downloaded source distribution to an empty directory. You should see a bunch of files, and an example mod is placed in src/main/java for you to look at. Only a few of these files are strictly necessary for mod development, and you may reuse these files for all your projects These files are:
    • build.gradle
    • gradlew (both .bat and .sh)
    • The gradle folder
  3. Move the files listed above to a new folder, this will be your mod project folder.
  4. Open up a command prompt in the folder you created in step (3), then run gradlew setupDecompWorkspace. This will download a bunch of artifacts from the internet needed to decompile and build Minecraft and forge. This might take some time, as it will download stuff and then decompile Minecraft. Note that, in general, these things will only need to be downloaded and decompiled once, unless you delete the gradle artifact cache.
  5. Choose your IDE: Forge explicitly supports developing with Eclipse or IntelliJ environments, but any environment, from Netbeans to vi/emacs, can be made to work.
    • For Eclipse, you should run gradlew eclipse - this will download some more artifacts for building eclipse projects and then place the eclipse project artifacts in your current directory.
    • For IntelliJ, simply import the build.gradle file.
  6. Load your project into your IDE.
    • For Eclipse, create a workspace anywhere (though the easiest location is one level above your project folder). Then simply import your project folder as a project, everything will be done automatically.
    • For IntelliJ, you only need to create run configs. You can run gradlew genIntellijRuns to do this.

 

When they say your code doesn't follow convention but ur edgy so u dont care

d-d-d-dab on them haterz

 

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



×
×
  • Create New...

Important Information

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