Added 1.21.1 mod targets

- Build Fabric, Forge and NeoForge per target listed in gradle/mod-targets.json (1.21.1, 26.3)
- Add 1.21.1 adapter source overlays under adapters/*/src/versions/1.21.1
- Add verifyModdedMatrix and per-target Java runtime verification of loader jars
- Re-inject persistent dimensions from the levels-ready hook before the watchdog starts
- Wait for queued chunks and the final save before pregen completes
- Add the 1.21.1 data version and datapack supported_formats range
- Cascade regions whose sea or shore pool loses every biome
- Use Gson calls available on the 1.21.1 runtime
This commit is contained in:
Brian Neumann-Fopiano committed 2026-10-16 10:25:19 -04:00
1 parent 0ca33068f3
commit 62062c4a95
58 files changed
+3279 -133

No files matched your search

@@ -11,6 +11,7 @@ import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@@ -38,6 +39,24 @@ public class ModdedArtifactVerifierTest {
@Rule
public final TemporaryFolder temporaryFolder = new TemporaryFolder();
@Test
public void rejectsClassesNewerThanSelectedRuntimeIncludingNestedJars() throws Exception {
ClassWriter writer = new ClassWriter(0);
writer.visit(Opcodes.V25, Opcodes.ACC_PUBLIC, "example/NewRuntime", null, "java/lang/Object", null);
writer.visitEnd();
Map<String, byte[]> entries = new LinkedHashMap<>();
entries.put("example/NewRuntime.class", writer.toByteArray());
File artifact = createArtifact(entries);
GradleException failure = assertThrows(GradleException.class,
() -> ModdedArtifactVerifier.verifyJavaRuntime(artifact, 21));
assertTrue(failure.getMessage().contains("requires Java 25"));
ModdedArtifactVerifier.verifyJavaRuntime(artifact, 25);
File nested = createArtifact(Map.of("META-INF/jars/library.jar", Files.readAllBytes(artifact.toPath())));
GradleException nestedFailure = assertThrows(GradleException.class,
() -> ModdedArtifactVerifier.verifyJavaRuntime(nested, 21));
assertTrue(nestedFailure.getMessage().contains("library.jar!/example/NewRuntime.class"));
}
@Test
public void acceptsMinecraftRuntimeReferences() throws Exception {
Map<String, byte[]> entries = validEntries();
@@ -166,6 +185,16 @@ public class ModdedArtifactVerifierTest {
assertTrue(failure.getMessage().contains("Iris-private runtime references"));
}
@Test
public void rejectsBukkitRelocatedGsonReferences() throws Exception {
Map<String, byte[]> entries = validEntries();
entries.put("art/arcane/iris/Test.class", "art/arcane/iris/util/gson/Gson"
.getBytes(StandardCharsets.ISO_8859_1));
GradleException failure = assertThrows(GradleException.class,
() -> ModdedArtifactVerifier.verify(createArtifact(entries), REQUIRED_ENTRIES));
assertTrue(failure.getMessage().contains("Iris-private runtime references"));
}
@Test
public void rejectsBundledMinecraftRuntimeLibrary() throws Exception {
Map<String, byte[]> entries = validEntries();