feat: add beet.contrib.mod_export - #458
Conversation
rx-dev
left a comment
There was a problem hiding this comment.
I understand this PR is a bit aged though I'm hoping to get our PRs wrangled now that Summit is over .
|
|
||
|
|
||
| def forge( | ||
| extra: Dict[str, PackFile], ctx: Context, opts: ModExportOptions, isNeo: bool |
There was a problem hiding this comment.
for our naming conventions, this should be
| extra: Dict[str, PackFile], ctx: Context, opts: ModExportOptions, isNeo: bool | |
| extra: Dict[str, PackFile], ctx: Context, opts: ModExportOptions, is_neo: bool |
| raise RuntimeError("no output directory set") | ||
|
|
||
| ctx.output_directory.mkdir(parents=True, exist_ok=True) | ||
| with ZipFile( |
There was a problem hiding this comment.
I wonder if we should be re-using beet.contrib.output machinery here and define mod definition files as extra files within the data / resource pack.
There was a problem hiding this comment.
If I remember correctly, the point here was to allow export as a mod, while not including these files in the datapack export
|
|
||
| @configurable(validator=ModExportOptions) | ||
| def mod_export(ctx: Context, opts: ModExportOptions): | ||
| extra: Dict[str, PackFile] = dict() |
There was a problem hiding this comment.
use modern typing now that we are 3.14+
|
Sorry, but you gotta make the changes yourself if you want to merge this. I'm not gonna get to this any time soon. |
This adds a plugin to bundle a data pack and resource pack into a single
.jarfile, including mod identifier files for fabric, neoforge, mcforge, and quilt.example config:
Things left to do:
pack.mcmetaandpack.png, but also other extra files such as a README)I've written this first for my own datapack at https://github.com/jacobsjo/lavaflow/blob/main/src/modded.py ; for the avoidance of doubt: I own full copyright of this file and am re-licensing this file under MIT