mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-12-01 02:04:51 +00:00
Let modded worlds bind and generate with generate-structures=false
Binding and native structure placement used to throw when the world had structures disabled; native families are already off in that case, so the guards only crashed the world.
Upstream: ee5aaec87
This commit is contained in:
1 parent
c3c137a33c
commit
971cad0463
3 files changed
+6
-54
No files matched your search
+6
-12
@@ -12,7 +12,6 @@ import java.nio.file.Path;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertSame;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class NativeStructureFailureContractTest {
|
||||
@@ -42,18 +41,13 @@ public class NativeStructureFailureContractTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void globalStructureDisableRefusesGeneratorBinding() {
|
||||
IrisModdedChunkGenerator.requireGlobalStructureGeneration(true, "overworld:overworld");
|
||||
public void disabledGlobalStructuresNeitherRefuseBindingNorFailPlacement() throws IOException {
|
||||
String generator = moddedSource("IrisModdedChunkGenerator.java");
|
||||
String stage = moddedSource("ModdedNativeStructureStage.java");
|
||||
|
||||
IllegalStateException error = assertThrows(
|
||||
IllegalStateException.class,
|
||||
() -> IrisModdedChunkGenerator.requireGlobalStructureGeneration(
|
||||
false, "overworld:overworld"));
|
||||
|
||||
assertTrue(error.getMessage().contains("overworld:overworld"));
|
||||
assertTrue(error.getMessage().contains("generate-structures=false"));
|
||||
assertTrue(error.getMessage().contains("importedStructures.disabled"));
|
||||
assertTrue(error.getMessage().contains("importedStructures.disabledExact"));
|
||||
assertFalse(generator.contains("generateStructures()"));
|
||||
assertFalse(generator.contains("requireGlobalStructureGeneration"));
|
||||
assertFalse(stage.contains("shouldGenerateStructures()"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in new issue
Block a user