Skip to content

Multipacks 230125.0555

Latest
Compare
Choose a tag to compare
@github-actions github-actions released this 25 Jan 05:56
· 7 commits to main since this release
d98662e

What's Changed

Full Changelog: 220712.0847...230125.0555

Brand new Multipacks

This version of Multipacks is a major update. That means your previous code might not work with this version of Multipacks. See the full changelog for code and API changes.

New repository system (uhh... sort of)

Multipacks no longer stores installed packs to .multipacks/, but instead in .multipacks/repository. You can change the local repository location by editing .multipacks/multipacks.config.json.

multipacks.index.json

The new index file format now have a new name: multipacks.index.json. You might need to update your packs to follow this new index format:

{
    "name": "sample-pack",
    "packVersion": "1.0.0",
    "author": "PhoMC",
    "sourceGameVersion": "1.19.3",
    "dependencies": [
        "name 'dependency-name'; version >= 1.2.3",
        "...put your query string here..."
    ],
    "features": ["update_1_20", "bundle"]
}

multipacks.modifiers.json and modifiers

Guess what? "Post processing passes" are now modifiers (I don't know why I choose the former in the first place). Some cool modifiers like "font glyphs" and "auto custom item models" are still there, but stuffs like "moving files" and "delete files" are not. If you wish to have those back, please open a new issue in our issues tracker.

[
    {
        "type": "multipacks:builtin/glyphs",
        "config": [
            {
                "allocate": [
                    {"font": "sample:my_font", "start": "\u0000", "end": "\uFFFF"}
                ]
            },
            {
                "id": "sample:my_glyph",
                "space": 69
            },
            {"include": "assets/multipacks/font/glyphs.json"}
        ]
    },
    {
        "type": "multipacks:builtin/models",
        "config": [
            {
                "id": "sample:my_cool_item",
                "model": "multipacks:sample_model",
                "item": "minecraft:barrier"
            }
        ]
    },
    {
        "type": "multipacks:builtin/atlases",
        "config": [
            {
                "file": "assets/multipacks/textures/sample_atlas.png",
                "template": {"include": "assets/multipacks/textures/atlas_template.json"}
            }
        ]
    }
]

Brand new command-line interface™

The previous CLI was horrible, both at using and maintaining it (we actually hardcoded it). You can check for help by using multipacks-cli [subcommand] -h.

Initial Java Edition 1.19.3 support

This is initial support, so stuffs like "auto atlases" will not be in this version. But at least you can target 1.19.3 and get a pack that the game can recognized as "valid 1.19.3 pack".

"Packs-in-jar"

This new Multipacks version also allows you to create "packs-in-jar", which allow you to store plugin assets within plugin jar file (we are talking about Spigot plugins here).

A cool application for this is a "modpack-like" plugin with add-ons that adds custom items with models, without having to manually compose the pack by yourself.

public class MyMultipacksPlugin extends multipacks.plugins.Plugin {
    @Override
    public void onInit(Platform platform) {
    }

    @Override
    public Collection<Repository> getPluginRepositories() {
        return Arrays.asList(repositoryFromPlugin("myPacksRepository"));
    }
}

// ...
// Load Multipacks plugin to Multipacks:
@Override
public void onEnable() {
    MultipacksSpigot.getPlatform().addPlugin(new ResourcePath("my-namespace", "addons/cool_addon"), new MyMultipacksPlugin());
}