-
Notifications
You must be signed in to change notification settings - Fork 20
Creating a Content Mod
FMUSE supports content mods, which is essentially a Flan's Mod content pack packaged as a Minecraft Forge mod. This allows content creators to take advantage of the Forge API, whether it's for dependency management, or update checking.
If you are converting an already-existent content pack, please see here. Otherwise...
First, you'll need to download or clone this repository. The easiest way is to click the green "Code" button, and select "Download ZIP". Once you have the repository downloaded and extracted, you can open the build.gradle
file in an IDE of your choice, such as IntelliJ.
Next, you'll need to create a new package under the src/java
directory. This can be any domain name you own, such as com.example.mynewpack
(or if you don't have one, you can alternatively use your GitHub domain, or use com.flansmod
).
Now we can add our mod class file (this step requires a little bit of Java knowledge, but it's not too bad). Create a class with the name of your content pack, suffixed with "Mod", such as...
//Note that you can add more dependencies, separated by a comma.
@Mod(modid = NewContentMod.MODID, name = NewContentMod.NAME, version = NewContentMod.VERSION, dependencies = "required-after: " + FlansMod.MODID)
public class NewContentMod implements IFlansContentProvider {
public static final String MODID = "new_content_mod";
public static final String VERSION = "1.0";
public static final String NAME = "New Content Pack";
@Override
public String getContentDirectory() {
//Return the name of your content pack directory.
return "Content Pack Directory";
}
@Override
public void registerModelLocations() {
//Your models will now be located inside this mod package instead.
//This means you'll need to define where your models are located, using a shorthand prefix.
FlansMod.registerModelLocation("ww2", "com.example.mynewpack.client.model");
}
}
You should be able to load the game using the Gradle task runClient
, which will allow you to see your brand new content pack in-game.
The rest of the content pack process is the same as default. Your models will go under your own mod package, such as com.example.mynewpack.client.model
, while your resources will continue to go into the flansmod
directory.