Skip to content

InvalidArgument3/Autisnautics2

Repository files navigation

Logo

PanPack

A template for the modern modpacker, featuring automatic mod updating, autolinting, build/release scripts, simple setup and more.

License Discord

Features

  • Pakku:
    • Easily control mods and resourcepacks, handling dependendices for you.
    • Simultaneous Curseforge and Modrinth Modpack Support1
    • Mods can be easily fetched (more on that below)
  • Actions:
    • Autolinting
      • By default, will automatically fix any lint issues in the KubeJS folder, keeping your code organized hassle free.
        • This behavior can be easily changed as applicable, if you prefer it to check pull requests
      • Custom Rules for Recipe Spacing, Call Chains and GTm Multiblocks (and more) included
    • Autoupdating:
      • Automatically sync your instance's mods with the repository
      • Automatically sync your instance's modloader version (and more) with the repository
        • Supports Forge and NeoForge
    • Build and Release
      • Automatically builds on commit, and will push to curseforge on a version change (Serverpacks included)
      • Automatically Diffs Mods and Pull Requests, and attaches your changelog
      • Can replace text with the update number, useful for the main menu or loading screen.
      • Can publish a truncated changelog to discord if a webhook is provided.
  • Other:
    • Very quick setup for contributors
    • VSC Workspace (in the .vscode folder)
    • Issue and PR templates
    • .gitignore (including some mod configs that add a last edited date)

Requirements

  • This template was written with Prism Launcher in mind. Those using other launchers will need to adjust setup instructions as needed to allow their launcher to recognize the template as an instance. Launchers without the ability to set prelaunch commands will need to fetch mods manually (see below).

Setup

As a template

  1. Clone your copy of this template into an empty (instancename)\minecraft folder
  2. Copy the contents of (instancename)\minecraft\.pakku\prism-overrides2 into your (instancename) folder to have a working Prism Instance.3

By default, the pack comes with a set of mods most packdevs find useful (optimization mods, KubeJS, Jade, etc); To add your mods and resourcepacks, open the project's /minecraft/ folder in a terminal (using a code editor such as VSC is recommended), and run java -jar pakku.jar add [<options>] [<projects>]. Pakku will handle dependencies for you.

Importing into an existing repository

  1. In your existing minecraft instance's /minecraft/ folder, ensure that you have one of the following available: manifest.json modrinth.index.json .mrpack, or a curseforge .zip file. (You can generate one with Prism)
  2. Clone the panpack template somewhere, copy over everything but pakku-lock.json (and .gitattributes and .git folder, of course)
  3. Open up your terminal, change directory to your instance's /minecraft/ folder, and run java -jar pakku.jar import <file from step 1>
  4. Edit minecraft/pakku.json, and minecraft/.pakku/prism-overrides/ as applicable, and add java -jar pakku.jar fetch to your instance's prelaunch commands

Don't forget to link to this page in your README so contributors will know how to set up their own instance!

Contributing to an existing repository that uses this template

  1. Clone your fork of the repository into an empty (instancename)\minecraft folder, and copy the contents of (instancename)\minecraft\.pakku\prism-overrides into your (instancename) folder to have a working Prism Instance. From there, you can start your newly created instances and the mods will be downloaded for you.3

Modloader Sync

Those wanting to also automatically sync the modloader version should replace the prelaunch command with one of the below commands instead.

Windows:

cmd /c "java -jar pakku.jar fetch && copy /Y "$INST_MC_DIR\.pakku\prism-overrides\mmc-pack.json" "$INST_DIR\mmc-pack.json"

Linux and MacOS

java -jar pakku.jar fetch && cp -f "$INST_MC_DIR/.pakku/prism-overrides/mmc-pack.json" "$INST_DIR/mmc-pack.json"

Building and releasing

Before you can run the buildscripts, you will need to go to the repository's secrets and variables and add CURSEFORGE_TOKEN into secrets and CURSEFORGE_ID into variables. Before releasing, go to release.yml, and change anything that's commented with "Change this!"

Also, ensure that your pakku.json has the following variables:

    "version": "DEV", // Leave this as dev, it will be replaced when the project is built. Don't include these comments in your actual pakku.json file.
    "release_type": "alpha", // or beta, or release. This one is used to tell curseforge the release type.

Usage

  • To initate a release, update CHANGELOG.MD with a new version, [Unreleased] can be used as a staging ground for changes.
    • [Unreleased] changes are included in the changelog for builds created from the dev branch.
  • Release type, overrides, and otherwise can be set in pakku.json
  • Give the workflow read/write permissions

Notes

  • This template supports automatically posting changelogs to discord: add a discord webhook to your secrets with the name discord-webhook if you wish to enable that.
  • Modloader syncs also works with your repository's Minecraft version and Modloader, niche as it may be.
    • Of course, they also work across branches, and can be disabled if you need to test something.
  • Some of the linting rules are disabled by default, you can enable them (or even add your own!) by editing custom-plugin.mjs.
  • By default, the changes on the main and dev branches are built, branch names and behavior can be adjusted in the buildscript.
  • Those wishing to handle linting on their end can use the precommit hook to run eslint automatically.

Credits

Footnotes

  1. Modrinth buildscripts are disabled by default, as most pack developers do not plan on releasing to modrinth due to important mods not being present, but can be easily uncommented if you do. If so, also add a MODRINTH_TOKEN and MODRINTH_ID secret and variable.

  2. The included mmc-pack is for forge 1.20.1, edit/replace mmc-pack with your own if on another version when initially setting up, just remember to add PreLaunchCommand=java -jar pakku.jar fetch to it. The repository will automatically update the mmc-pack in prism-overrides based on your pakku.lock when you push.

  3. In the event that the prelaunch fetch command isn't automatically applied, simply just add java -jar pakku.jar fetch (or one of it's varients) to your instance's prelaunch commands manually. 2

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages