Skip to content

Releases: phomc/multipacks

Multipacks 230125.0555

25 Jan 05:56
d98662e
Compare
Choose a tag to compare

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());
}

Multipacks 220712.0847

12 Jul 08:48
4ffff6b
Compare
Choose a tag to compare

What's Changed

  • Build script changes for better support with other projects by @nahkd123 in #10
  • Fix Multipacks plugins system throwing NoClassDefFoundError by @nahkd123 in #11
  • Prevent Gson from being shadowed to Spigot plugin jar by @nahkd123 in #12
  • Multipacks for Spigot improvement by @nahkd123 in #13
  • Contents allocations API and Item models allocation by @nahkd123 in #14
  • Fix virtual filesystem ls not returning the file when querying... by @nahkd123 in #15
  • Documentations update by @nahkd123 in #16
  • Change pack bundling behavior for dependencies by @nahkd123 in #17

Multipacks Wiki™

Some of you might be confused when using previous release: the documentations does not matches with actual result! This update resolves this issue by, well, create another documentations! Sounds stupid but we've been using docs/ at repository for ages now! This is because the early stage of development, we have been making this repostiory private from outside travellers.

Anyways, the brand new wiki is now live! Go ahead and visit this cool lookin' Wiki page.

Multipacks for Spigot

This new update now allow all plugins to use your master pack (a.k.a the only pack you'll ever needed). If you found some cool pack from somewhere on the Internet, you can just download it, install using /multipacks install cool-kid, add that pack to your master pack dependencies list and /multipacks rebuild.

This brand new update also add more APIs to the plugin itself, which you can figure it out by looking at "What's Changed" section.

Full Changelog: 220708.1526...220712.0847

Multipacks 220708.1526

08 Jul 15:26
1df7b68
Compare
Choose a tag to compare

What's Changed

  • Massive Multipacks rework by @nahkd123 in #6
  • Plugins for Multipacks CLI by @nahkd123 in #7
  • Adding back post processing passes (was transform passes previously) by @nahkd123 in #8
  • Dynamic packs generation support by @nahkd123 in #9

Multipacks Plugins™

The wait is over! Check out Multipacks Plugins, a new way to extends Multipacks CLI. Simply download a plugin of your choice, then use --plugin very-shady-plugin.jar to use it:

multipacks-cli pack build ./myPack -O ./very-cool-pack.zip --plugin blockbench-for-multipacks.jar

You can also add more than 1 plugin:

multipacks-cli pack build ./myPack -O ./very-cool-pack.zip --plugin blockbench-for-multipacks.jar --plugin color-grading.jar --plugin fix-my-model-plugin.jar

Loaded plugins will be shown before packaging happens:

Plugin: multipacks-sample-plugin-0.0.1-SNAPSHOT.jar
Hello world!
Plugin: blockbench-for-multipacks.jar
Plugin: color-grading.jar
Preparing bundler...
(File will be written to a.zip)
Bundling...
Done.

Using the new dynamic packs™

Are you a mod developer? Do you want to use the brand new Multipacks™(TM™)? Introducing: Multipacks Dynamic packs support! Simply extends DynamicPack class, write some random file to VirtualFs object and you're done!

class CoolKidPack extends DynamicPack {
    public CoolKidPack() {
        super(new PackIndex().id("coolkid").packVersion(new Version("1.1")).gameVersion(new Version(">=1.19")));
    }
    
    @Override
    public void build(VirtualFs fs, BundleResult result) {
        fs.write(new Path("pack.png"), ICON_DATA);
        fs.writeText(new Path("data/coolkid/loots_table/default.json"), "{}");
    }
}

A bit better Spigot API

Users of Spigot API can now use BungeeGlyphs to convert generated glyphs into Bungeecoord Chat Component API (and before you ask me "tf bungeecoord inside spigot?", yes there is Bungeecord Chat API on Spigot).

Glyph glyph = result.getOrCreate(GlyphsMap.class, GlyphsMap::new).get(new ResourcePath("myfont", "my_cool_icon"));
player.spigot().sendMessage(BungeeGlyphs.from(glyph).build());

Full Changelog: 220706.1148...220708.1526

Multipacks 220606.1359

06 Jun 13:59
2e27137
Compare
Choose a tag to compare

What's Changed

Full Changelog: 220603.1415...220606.1359

Multipacks 220603.1415

03 Jun 14:15
44f50e9
Compare
Choose a tag to compare

What's Changed

  • More transform passes & security vulnerability fix by @nahkd123 in #2

Full Changelog: 220603.0253...220603.1415

Edit by @nahkd123: Please consider update your Multipacks CLI (and Multipacks API for Spigot, if you do use it). This update includes a security vulnerability patch (which involves path traversal attack).

Multipacks 220603.0253

03 Jun 02:53
bd72c93
Compare
Choose a tag to compare
Add GitHub Actions workflows (#1)

* Add GitHub Actions workflows

* Add eXcutable mode to gradlew