Topic category: Plugins and third-party tools
To start this off, I'm not sure if this belongs under "Modding", "Other", "Help and Tutorials", or a completely different sub-category. If movable, please place it under the correct category/sub-category. Currently under Other: Plugins and Third-party tools, due to it talking about Core, Libraries, and Modifications to code.
I've been working on a mod that is a decent size. So, I've decided to create a Core, or Library, that will help the main modification out. I've found that I can add an Additional Required Mod, that will help with development. I noticed that the information about the Additional Required Mod is saved in a file called, " mods.toml " found in the folder META-INF, under the Workspace file browser. I noticed there is a versionRange="[0,)". When starting the main mod, for testing, it will say, "Mod [name] requires [core name] 0 or above", Which is understandable. However, When changing versionRange="[0,)" to versionRange="[1.0.0,]" / versionRange="[1.0.0,)", it reverts back to versionRange="[0,)".
I've noticed also,
versionRange="[0,)" states, "Mod [name] requires [core name] 0 or above"
versionRange="[0,]" states, "Mod [name] requires [core name] 0 or above"
versionRange="[0,1)" states, "Mod [name] requires [core name] 0 or above, and below 1
versionRange="[0,1]" states, "Mod [name] requires [core name] 0 and 1 (inclusive)
I'm only able to find that out by spamming CTRL+S on the mods.toml tab after clicking "Run Client".
My question is: how do I keep the changes, or add a required version to the Workspace settings?
I'm trying to make sure if there is a problem with a version, tweaks can be made, then I can publish the changes.
I've also noticed that even when building the mod for distribution, it changes back to versionRange="[0,)" and I cannot spam CTRL+S while it's building that way.
Found that out by using JD-GUI [Java Decompiler]
Here is the content of mods.toml
modLoader="javafml" loaderVersion="[36,)" license="[Undecided]" [[mods]] modId="mod_name" version="1.0.0" displayName="Mod Name" credits="Created using mod maker MCreator - https://mcreator.net/about" displayURL="https://mcreator.net" authors="PC User, MCreator" [[dependencies.mod_name]] modId="minecraft" mandatory=true versionRange="[1.16.5]" ordering="NONE" side="BOTH" [[dependencies.mod_name]] modId="mod_core" mandatory=true versionRange="[0,)" #This is what the post is talking about. ordering="NONE" side="BOTH"
Any help would be appreciated, or even an update to MCreator that allows creators to add custom version to their cores and libraries would be outstanding! Thank you in advance.