Drop the legacy handling of a pack's own iris-builtins.jar

Nothing is released, so packs get no compatibility path: a pack that
still holds its own iris-builtins.jar fails to load naming both jars
(IrisApi), instead of being skipped with a warning. The missing
built-ins warning no longer suggests copying the jar into a pack, which
would now collide with the bundled one; it says to build the plugin.
This commit is contained in:
piexel committed 2026-10-22 09:59:51 +02:00
1 parent 72c3d662c1
commit bc7f9127b5
4 files changed
+4 -15

No files matched your search

@@ -45,6 +45,6 @@ final class MissingBuiltInModules {
return Optional.of("Pack " + packFolder.getName() + " loads without the built-in modules (" + JAR_NAME + "): its world gets"
+ " only its layout (biomes and heights), with no terrain blocks, ores, caves, decorations, objects or vanilla features,"
+ " and no loot, block drops, entity spawns or ambient effects. This build of Iris does not bundle " + JAR_NAME
+ "; use a complete build, or copy the jar into " + new File(packFolder, PackModuleSet.MODULES_FOLDER).getPath() + ".");
+ "; build the plugin with ./gradlew iris.");
}
}
@@ -40,7 +40,6 @@ public final class PackModuleSet implements AutoCloseable {
static final String MODULES_FOLDER = "modules";
private static final String JAR_EXTENSION = ".jar";
private static final String MISSING_BUILT_INS_KEY = "missing-built-in-modules:";
private static final String REPLACED_JAR_KEY = "replaced-module-jar:";
private final File packFolder;
private final Supplier<Gson> irisGson;
@@ -125,7 +124,6 @@ public final class PackModuleSet implements AutoCloseable {
pack = loaded;
state = State.LOADED;
warnWhenBuiltInModulesAreMissing(loaded);
warnAboutReplacedJars(loaded);
} catch (RuntimeException loadFailure) {
failure = new PackModulesException(packFolder, loadFailure);
state = State.FAILED;
@@ -139,14 +137,6 @@ public final class PackModuleSet implements AutoCloseable {
.ifPresent(warning -> IrisLogging.warnOnce(MISSING_BUILT_INS_KEY + packFolder.getAbsolutePath(), "%s", warning));
}
/** A pack's own copy of a jar Iris bundles, such as an old {@code iris-builtins.jar}, is left out; its owner is told once. */
private void warnAboutReplacedJars(LoadedPack loaded) {
for (String jar : loaded.replacedJars()) {
String path = new File(packFolder, jar).getAbsolutePath();
IrisLogging.warnOnce(REPLACED_JAR_KEY + path, "%s is not loaded; Iris's own copy loads instead. Delete it.", path);
}
}
/** Each module jar's name, size and modification time, in name order. */
private List<String> jarFingerprint() {
File[] jars = new File(packFolder, MODULES_FOLDER).listFiles(file -> file.isFile() && file.getName().endsWith(JAR_EXTENSION));