Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add beet.contrib.mod_export #458

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

jacobsjo
Copy link

@jacobsjo jacobsjo commented Dec 17, 2024

This adds a plugin to bundle a data pack and resource pack into a single .jar file, including mod identifier files for fabric, neoforge, mcforge, and quilt.

example config:

pipeline:
- beet.contrib.mod_export
meta:
  mod_export:
    fabric: true
    quilt: true
    neoforge: true
    mcforge: true
    name: '{{project_id}}_{{project_version}}' # filename of resulting .jar file without extension
    group: dev.mcbeet # only used by quilt, but then required

    # these are 2 fields since every loader has a different format to specify format ranges
    # if unspecified uses version specified in beet config
    min_minecraft_version: 1.21.4
    max_minecraft_version: 1.21.5

    license: MIT
    contact:
      # any field is allowed here, but only homepage and issues is used for [mc|neo]forge
      homepage: https://mcbeet.dev/
      issues: https://github.com/mcbeet/beet/issues
    authors: # overwriting author from beet config to allow multiple authors listed separately
    - A
    - B
    contributors:
    - C

Things left to do:

  • Deal with files that are in both resource and data pack (i.e. pack.mcmeta and pack.png, but also other extra files such as a README)
    • Currently this prints warnings, and is actually resulting in duplicate files in the jar archive; probably leading to hard to debug issues with different tools using different files for the same filename
    • I think this would require changes to core, so I would need some help here.
  • Deal with (resource pack) overlays
    • Since there is only one pack.mcmeta, it is unclear how this can work
    • I think fabric uses data-pack version numbers to select resource pack overlays, might be difficult to handle properly
    • I don't know how other loaders handle overlays, if at all

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant