mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 08:44:50 +00:00
Extract built-in Iris features into the default module
Move existing feature implementations and pack models out of core into modules/default without changing packages or algorithms. Compile both source roots together while legacy engine dependencies remain. Add source ownership checks, preserve the Bukkit purity ceiling across both roots, and update source-based diagnostics and archives. Validation: fresh compilation preserves all 1,995 runtime class hashes; module and Bukkit artifact checks pass. Targeted runs cover 955 tests, with 953 passing and two platform-fixture failures reproduced on the original commit.
This commit is contained in:
1 parent
846bd3e696
commit
5544c96bc5
395 files changed
+178
-15
No files matched your search
@@ -30,8 +30,8 @@ public class DiagnosticSeverityPolicyTest {
|
||||
assertLoggedWith("util/project/hunk/Hunk.java", "OUT OF BOUNDS ", "debug");
|
||||
assertLoggedWith("engine/mantle/MantleWriter.java", "No set? ", "debug");
|
||||
assertLoggedWith("engine/mantle/MantleWriter.java", "Mantle Writer Accessed chunk out of bounds", "debug");
|
||||
assertLoggedWith("engine/object/IrisDecorator.java", "Empty Block Data for ", "warnOnce");
|
||||
assertLoggedWith("engine/object/IrisCompat.java", "Can't find block data for ", "warnOnce");
|
||||
assertLoggedWith("engine/object/decoration/IrisDecorator.java", "Empty Block Data for ", "warnOnce");
|
||||
assertLoggedWith("engine/object/compatibility/IrisCompat.java", "Can't find block data for ", "warnOnce");
|
||||
assertLoggedWith("engine/data/cache/AtomicCache.java", "Atomic cache supplier failed: %s: %s", "warnOnce");
|
||||
assertLoggedWith("engine/IrisComplex.java", "Failed to sample interpolated biome bounds", "warnOnce");
|
||||
assertLoggedWith("engine/framework/placer/WorldObjectPlacer.java", "Tried to place custom block at", "warnOnce");
|
||||
@@ -59,7 +59,12 @@ public class DiagnosticSeverityPolicyTest {
|
||||
|
||||
@Test
|
||||
public void coreProductionDoesNotWriteDirectlyToProcessStreams() throws IOException {
|
||||
try (Stream<Path> files = Files.walk(Path.of("src/main/java"))) {
|
||||
assertNoProcessStreamWrites(Path.of("src/main/java"));
|
||||
assertNoProcessStreamWrites(defaultModuleSources());
|
||||
}
|
||||
|
||||
private static void assertNoProcessStreamWrites(Path sourceRoot) throws IOException {
|
||||
try (Stream<Path> files = Files.walk(sourceRoot)) {
|
||||
List<Path> bypasses = files
|
||||
.filter(path -> path.toString().endsWith(".java"))
|
||||
.filter(path -> {
|
||||
@@ -118,7 +123,7 @@ public class DiagnosticSeverityPolicyTest {
|
||||
*/
|
||||
@Test
|
||||
public void theUnusedDebugImageWriterIsGone() throws IOException {
|
||||
assertFalse(read("engine/object/IrisImage.java").contains("writeDebug"));
|
||||
assertFalse(read("engine/object/image/IrisImage.java").contains("writeDebug"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -180,6 +185,14 @@ public class DiagnosticSeverityPolicyTest {
|
||||
}
|
||||
|
||||
private static String read(String relativePath) throws IOException {
|
||||
return Files.readString(Path.of("src/main/java/art/arcane/iris").resolve(relativePath)).replace("\r\n", "\n");
|
||||
Path source = Path.of("src/main/java/art/arcane/iris").resolve(relativePath);
|
||||
if (!Files.isRegularFile(source)) {
|
||||
source = defaultModuleSources().resolve("art/arcane/iris").resolve(relativePath);
|
||||
}
|
||||
return Files.readString(source).replace("\r\n", "\n");
|
||||
}
|
||||
|
||||
private static Path defaultModuleSources() {
|
||||
return Path.of(System.getProperty("iris.defaultModuleSources", "../modules/default/src/main/java"));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user