mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 16:54:04 +00:00
Hydrology Fix, and V+
This commit is contained in:
1 parent
dfb3748059
commit
1e1eaa96aa
137 files changed
+8842
-711
No files matched your search
@@ -3078,7 +3078,7 @@ public final class HydrologyPackProbe {
|
||||
deepCourses++;
|
||||
}
|
||||
}
|
||||
for (HydrologyDiagnosticCandidate candidate : tile.diagnosticCandidates()) {
|
||||
for (HydrologyDiagnosticCandidate candidate : runtime.diagnosticCandidates(tile.key())) {
|
||||
RejectionKey rejection = new RejectionKey(
|
||||
candidate.kind(),
|
||||
candidate.projectedType(),
|
||||
@@ -3738,7 +3738,6 @@ public final class HydrologyPackProbe {
|
||||
surfaceBiome,
|
||||
engine,
|
||||
engine.getSeedManager().getBiome(),
|
||||
engine.getDimension().getLoadKey(),
|
||||
position.x(),
|
||||
position.z()
|
||||
);
|
||||
@@ -3759,7 +3758,6 @@ public final class HydrologyPackProbe {
|
||||
IrisBiome biome,
|
||||
Engine engine,
|
||||
long biomeSeed,
|
||||
String dimensionKey,
|
||||
int x,
|
||||
int z
|
||||
) {
|
||||
@@ -3778,7 +3776,7 @@ public final class HydrologyPackProbe {
|
||||
if (custom == null || custom.getId() == null || custom.getId().isBlank()) {
|
||||
throw new IllegalStateException("Generated custom surface Iris biome resolved no custom biome id.");
|
||||
}
|
||||
return IrisDimension.customBiomeKey(dimensionKey, custom.getId());
|
||||
return engine.getData().customBiomeResourceKey(engine.getDimension(), custom);
|
||||
}
|
||||
|
||||
private static void verifyCaveWitness(
|
||||
|
||||
@@ -89,7 +89,7 @@ public final class HydrologyPlannerProbe {
|
||||
warmTimings[seedIndex],
|
||||
tile.courses().size(),
|
||||
tile.features().size(),
|
||||
tile.diagnosticCandidates().size(),
|
||||
cache.diagnosticCandidates(tile.key()).size(),
|
||||
counts
|
||||
);
|
||||
cache.close();
|
||||
|
||||
@@ -224,7 +224,8 @@ public final class RiverTransectProbe {
|
||||
tile.cavePlan(course.id()).map((plan) -> plan.accepted() ? "accepted" : "rejected").orElse("none")));
|
||||
}
|
||||
|
||||
for (String line : rejectionLines(tile)) {
|
||||
List<HydrologyDiagnosticCandidate> diagnostics = runtime.diagnosticCandidates(key);
|
||||
for (String line : rejectionLines(diagnostics)) {
|
||||
System.out.println(PREFIX + " " + line);
|
||||
}
|
||||
writeTileDiagnostics(new File(configuration.output(), "tile-diagnostics.png"), tile, complex, runtime, seaLevel);
|
||||
@@ -253,7 +254,7 @@ public final class RiverTransectProbe {
|
||||
System.out.println(PREFIX + " " + detail);
|
||||
}
|
||||
}
|
||||
writeSummary(new File(configuration.output(), "summary.txt"), configuration, tile, summaries);
|
||||
writeSummary(new File(configuration.output(), "summary.txt"), configuration, tile, summaries, diagnostics);
|
||||
boolean pass = !summaries.isEmpty() && summaries.stream().allMatch(CourseSummary::passes);
|
||||
System.out.println(PREFIX + " " + (pass ? "PASS" : "FAIL")
|
||||
+ " surfaceCourses=" + summaries.size()
|
||||
@@ -262,10 +263,10 @@ public final class RiverTransectProbe {
|
||||
}
|
||||
}
|
||||
|
||||
static List<String> rejectionLines(HydrologyTile tile) {
|
||||
static List<String> rejectionLines(List<HydrologyDiagnosticCandidate> candidates) {
|
||||
TreeMap<String, Integer> counts = new TreeMap<>();
|
||||
TreeMap<String, ArrayList<Integer>> details = new TreeMap<>();
|
||||
for (HydrologyDiagnosticCandidate candidate : tile.diagnosticCandidates()) {
|
||||
for (HydrologyDiagnosticCandidate candidate : candidates) {
|
||||
String key = "rejected " + candidate.kind() + " " + candidate.projectedType() + " " + candidate.rejection();
|
||||
counts.merge(key, 1, Integer::sum);
|
||||
if (candidate.detail() != 0) {
|
||||
@@ -652,7 +653,7 @@ public final class RiverTransectProbe {
|
||||
}
|
||||
}
|
||||
}
|
||||
for (HydrologyDiagnosticCandidate candidate : tile.diagnosticCandidates()) {
|
||||
for (HydrologyDiagnosticCandidate candidate : runtime.diagnosticCandidates(tile.key())) {
|
||||
int rgb = switch (candidate.rejection()) {
|
||||
case NO_DRAINAGE_PATH -> 0xFF2020;
|
||||
case COURSE_TOO_SHORT -> 0xFFB000;
|
||||
@@ -846,7 +847,8 @@ public final class RiverTransectProbe {
|
||||
File file,
|
||||
Configuration configuration,
|
||||
HydrologyTile tile,
|
||||
List<CourseSummary> summaries
|
||||
List<CourseSummary> summaries,
|
||||
List<HydrologyDiagnosticCandidate> diagnostics
|
||||
) throws IOException {
|
||||
StringBuilder text = new StringBuilder();
|
||||
text.append("tile=").append(tile.key().tileX()).append(',').append(tile.key().tileZ())
|
||||
@@ -855,7 +857,7 @@ public final class RiverTransectProbe {
|
||||
.append(" courses=").append(tile.courses().size())
|
||||
.append(" surfaceCourses=").append(summaries.size())
|
||||
.append('\n');
|
||||
for (String line : rejectionLines(tile)) {
|
||||
for (String line : rejectionLines(diagnostics)) {
|
||||
text.append(line).append('\n');
|
||||
}
|
||||
int maximumCut = 0;
|
||||
|
||||
Reference in new issue
Block a user