Ship each built-in module as its own jar and let a pack's modules.json decide which update on their own

The built-ins no longer travel as one iris-builtins.jar that a pack has to
copy by hand. IrisModule builds one jar per module (the eight placement
stages share one) with an index of the id and version each module reports,
and Iris bundles that folder.

A pack lists the modules it uses in modules.json, with the version it was
built with and an optional pinned list. Before a pack loads, Iris installs
the jars of listed modules and replaces a jar that differs from the one it
ships. It keeps a jar when the module is pinned, when the pack holds a newer
version than Iris ships, and, in a world's copy of a pack, when the major
version changed, because new chunks would not match the old ones. A jar that
shares classes with a kept jar stays with it, since the two were compiled
against each other. /iris pack update takes the kept terrain changes for a
world. What is installed is recorded in modules.lock.json.

Module versions are now major.minor.patch per module, starting at 1.0.0,
with major meaning "places different blocks or stops loading settings".
This commit is contained in:
piexel committed 2026-11-11 12:51:53 +01:00
1 parent e7d1ed24cb
commit 6e96c6b71e
85 files changed
+2568 -480

No files matched your search

@@ -19,6 +19,9 @@
package art.arcane.iris.core.commands;
import art.arcane.iris.Iris;
import art.arcane.iris.core.localization.BukkitCommandMessagesExtended;
import art.arcane.iris.core.modules.KeptModuleUpdates;
import art.arcane.iris.core.tools.IrisToolbelt;
import art.arcane.iris.core.pack.PackDirectoryResolver;
import art.arcane.iris.core.pack.PackResourceCleanup;
import art.arcane.iris.core.pack.PackValidationCache;
@@ -31,6 +34,8 @@ import art.arcane.volmlib.util.director.annotations.Director;
import art.arcane.volmlib.util.director.annotations.Param;
import art.arcane.volmlib.util.localization.TextKey;
import org.bukkit.World;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
@@ -90,6 +95,18 @@ public class CommandPack implements DirectorExecutor {
persistValidationCache(packsRoot);
}
@Director(description = "Take the module updates a world kept because they change its terrain", descriptionKey = "iris.director.commandpack.director.take_kept_module_updates")
public void update(
@Param(name = "world", description = "The Iris world whose modules to update", descriptionKey = "iris.director.commandpack.param.world_take_module_updates", contextual = true, contextualOverride = true)
World world
) {
if (!IrisToolbelt.isIrisWorld(world)) {
sender().sendMessage(IrisLanguage.text(BukkitCommandMessagesExtended.COMMAND_STUDIO_YOU_NEED_BE_SPECIFY_IRIS_GENERATED_WORLD));
return;
}
KeptModuleUpdates.take(IrisToolbelt.access(world).getEngine().getData()).forEach(sender()::sendMessage);
}
@Director(description = "Preview or apply unused-resource cleanup", descriptionKey = "iris.director.commandpack.director.preview_apply_unused_resource_cleanup", aliases = {"c"})
public void cleanup(
@Param(description = "The pack folder name to clean", descriptionKey = "iris.director.commandpack.param.pack_folder_name_clean")