mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-11-28 08:44:50 +00:00
Scored ingest biome placement
- Mod biomes pick their template across all regions by climate distance, biome category agreement from minecraft and c tags, a reuse penalty that spreads biomes over equally good templates, and the region's overall climate - Regions much rarer than the dimension's median region are treated as themed and only receive a mod biome when nothing else fits - Templates derived from void biomes no longer act as climate references - /iris ingest mods accepts excludeRegions=<a,b> to keep mod biomes out of named regions; unknown region names are refused
This commit is contained in:
1 parent
8388194129
commit
0bc235afb6
34 files changed
+389
-66
No files matched your search
+5
-1
@@ -36,15 +36,17 @@ public class ModIngestArgumentsTest {
|
||||
assertEquals("modded_overworld", arguments.targetPack());
|
||||
assertEquals("overworld", arguments.dimension());
|
||||
assertEquals(Set.of(), arguments.namespaces());
|
||||
assertEquals(Set.of(), arguments.excludedRegions());
|
||||
assertFalse(arguments.replace());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void keyedOptionalsAreParsedInAnyOrder() {
|
||||
ModIngestArguments arguments = ModIngestArguments.parse(
|
||||
" overworld modded replace=true namespaces=biomesoplenty,terralith dimension=overworld_alt ");
|
||||
" overworld modded replace=true namespaces=biomesoplenty,terralith excludeRegions=prismatics,estranged dimension=overworld_alt ");
|
||||
|
||||
assertEquals("overworld_alt", arguments.dimension());
|
||||
assertEquals(Set.of("prismatics", "estranged"), arguments.excludedRegions());
|
||||
assertEquals(Set.of("biomesoplenty", "terralith"), arguments.namespaces());
|
||||
assertTrue(arguments.replace());
|
||||
}
|
||||
@@ -72,6 +74,8 @@ public class ModIngestArgumentsTest {
|
||||
assertEquals("invalid dimension key 'a..b'", reason("overworld modded dimension=a..b"));
|
||||
assertEquals("invalid namespace 'Bad'", reason("overworld modded namespaces=ok,Bad"));
|
||||
assertEquals("namespaces must not be empty", reason("overworld modded namespaces=,"));
|
||||
assertEquals("invalid region 'a/../b'", reason("overworld modded excludeRegions=a/../b"));
|
||||
assertEquals("excludeRegions must not be empty", reason("overworld modded excludeRegions=,"));
|
||||
assertEquals("source and target must be different packs", reason("overworld overworld"));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ public class ModdedCatalogCommandsTest {
|
||||
assertTrue(ModdedCommandHelp.documents("ingest", "mods"));
|
||||
List<String> lines = ModdedCommandHelp.consoleLines("ingest");
|
||||
assertTrue(lines.stream().anyMatch((String line) ->
|
||||
line.startsWith("/iris ingest mods <source> <target> [dimension=<key>] [namespaces=<a,b>] [replace=true] - ")));
|
||||
line.startsWith("/iris ingest mods <source> <target> [dimension=<key>] [namespaces=<a,b>] [excludeRegions=<a,b>] [replace=true] - ")));
|
||||
}
|
||||
|
||||
private static CommandNode<CommandSourceStack> child(CommandNode<CommandSourceStack> parent, String name) {
|
||||
|
||||
Reference in new issue
Block a user