diff --git a/neoforge/build.gradle.kts b/neoforge/build.gradle.kts index 1de4154d4..53cf940d5 100644 --- a/neoforge/build.gradle.kts +++ b/neoforge/build.gradle.kts @@ -99,7 +99,7 @@ neoForge { sourceSet = sourceSets.getByName("gametest") systemProperty("neoforge.enabledGameTestNamespaces", "lithium-gametest") - environment("LITHIUM_GAMETEST_RESOURCES", file("src/gametest/resources").path) + environment("LITHIUM_GAMETEST_RESOURCES", file("../../../common/src/gametest/resources/data/lithium-gametest/gametest/structure").path) } create("gametestServer") { type = "gameTestServer" @@ -107,7 +107,7 @@ neoForge { sourceSet = sourceSets.getByName("gametest") systemProperty("neoforge.enabledGameTestNamespaces", "lithium-gametest") - environment("LITHIUM_GAMETEST_RESOURCES", file("src/gametest/resources").path) + environment("LITHIUM_GAMETEST_RESOURCES", file("../../../common/src/gametest/resources/data/lithium-gametest/gametest/structure").path) } } diff --git a/neoforge/src/gametest/java/net/caffeinemc/mods/lithium/neoforge/test/LithiumNeoforgeGameTest.java b/neoforge/src/gametest/java/net/caffeinemc/mods/lithium/neoforge/test/LithiumNeoforgeGameTest.java index b835be6cc..e1a999125 100644 --- a/neoforge/src/gametest/java/net/caffeinemc/mods/lithium/neoforge/test/LithiumNeoforgeGameTest.java +++ b/neoforge/src/gametest/java/net/caffeinemc/mods/lithium/neoforge/test/LithiumNeoforgeGameTest.java @@ -24,8 +24,7 @@ @GameTestHolder("lithium-gametest") public class LithiumNeoforgeGameTest { - //Not very nice to do this but it works - public static final String LITHIUM_GAMETEST_SNBT_PATH = "../../../common/src/gametest/resources/data/lithium-gametest/gametest/structure"; + public static final String LITHIUM_GAMETEST_SNBT_PATH = System.getenv("LITHIUM_GAMETEST_RESOURCES"); //Some tests are excluded because Neoforge is breaking them, not lithium. //test_redstone.lava_push_speed broken by https://github.com/neoforged/NeoForge/issues/1575 @@ -113,6 +112,10 @@ private static Optional checkFailureBlocks(GameTestHelper gameTestHelp @GameTestGenerator public Collection getAllRedstoneTests() { + if (LITHIUM_GAMETEST_SNBT_PATH == null) { + return List.of(); + } + List structureNames = null; try { structureNames = getLithiumSNBTFilenames();