Yes, you can add anything to your modpack.
There are two complementing each other ways of adding content to the modpack.
-
To re-use already existing files on server use
syncedFilesread more in config. As an example with default config it creates modpack containing every mod (file ending with .jar) from server~/mods/folder. -
To add more files to modpack without affecting server use separate directory
~/automodpack/host-modpack/main/. For example to add more mods place mods in the~/automodpack/host-modpack/main/mods/folder. Or to add resource packs analogically place the packs in the~/automodpack/host-modpack/main/resourcepacks/folder. That scheme applies to any other files you would like to add to the modpack, just copy the folder structure from~/.minecraft/and place them into themain.
Heads up!
Do not place in the modpack cache files, like connector's .connector directory, its not supposed to be provided within modpack and it break seamless/reboot-less updates.
Both of these methods translate to the ~/.minecraft/ on client side (root directory of minecraft instance).
Remember to regenerate the modpack using /automodpack generate (see commands)
Syncing everything from default server mods is just default, you can disable it completely (see config).
The host-modpack folder is synced implicitly, it doesn't require config, automodpack assumes that if there are files in that directory, you want to send them to clients.
syncedFiles is used only for files outside the host-modpack folder.
Example
Assuming you have the following server file structure:
āāā automodpackā āāā automodpack-client.jsonā āāā automodpack-server.jsonā āāā host-modpackā āāā automodpack-content.jsonā āāā mainā āāā configā ā āāā my-super.confā ā āāā shadow.txtā āāā modsā ā āāā fabric-api.jarā ā āāā herobrine-mod.jarā āāā options.txtā āāā resourcepacksā āāā shaderpacksā āāā the-ultimate-shader.zipāāā best-anime.txtāāā configā āāā ferritecore.mixin.propertiesā āāā invisible-radio.jsonāāā kubejsā āāā client_scriptsā ā āāā welcome.jsā āāā common_scriptsā ā āāā recipes.jsā āāā server_scriptsā āāā datapack_loader.jsāāā modsāāā automodpack.jarāāā fabric-api.jarāāā ferritecore.jarāāā modmenu.jarāāā sodium-fabric.jar
With a server config of:
| Setting | Values |
|---|---|
syncedFiles | ["/mods/*.jar", "/kubejs/**", "!/kubejs/server_scripts/**", "/emotes/*"] |
allowEditsInFiles | ["/options.txt", "/config/**"] |
forceCopyFilesToStandardLocation | [] |
The resulting modpack on client would contain:
āāā configā āāā my-super.conf (editable)ā āāā shadow.txt (editable)āāā kubejsā āāā client_scriptsā ā āāā welcome.jsā āāā common_scriptsā āāā recipes.jsāāā modsā āāā fabric-api.jar (version from host-modpack)ā āāā ferritecore.jarā āāā herobrine-mod.jar (from host-modpack)ā āāā modmenu.jarā āāā sodium-fabric.jarāāā options.txt (editable)āāā resourcepacksāāā shaderpacksāāā the-ultimate-shader.zip
As you can see there are files included using both methods, they complement each other these two make up our single modpack bucket/group (currently named main - in the future there will be custom grouping available).
AutoModpack is obviously excluded since you need it to download the modpack in the first place, AutoModpack has its own update mechanism. By default, it syncs the version from server independently of your modpack.
In case when two files share the same relative path, files from host-modpack are prioritized.
The allowEditsInFiles is evaluated last, on top of the modpack so in order for it to work, the files need to exist in the first place. So as you can see even though config/ferritecore.mixin.properties and config/invisible-radio.json match the wildcard of "/config/**" in the allowEditsInFiles, they don't exist in the modpack at all since they weren't included by any of the methods.