Skip to content

Commit 89c685c

Browse files
Disable network synchronizer
1 parent afdaa62 commit 89c685c

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

build.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ loom {
101101
accessWidenerPath = file("src/main/resources/chestesp.accesswidener")
102102

103103
runs {
104+
clientGameTest {
105+
vmArgs.add("-Dfabric.client.gametest.disableNetworkSynchronizer=true")
106+
}
104107
clientWithMods {
105108
inherit client
106109
}
@@ -109,6 +112,7 @@ loom {
109112
source = sourceSets.gametest
110113
runDir = "build/run/clientGameTestWithMods"
111114
vmArgs.add("-Dfabric.client.gametest")
115+
vmArgs.add("-Dfabric.client.gametest.disableNetworkSynchronizer=true")
112116
vmArgs.add("-Dchestesp.withMods=true")
113117
programArgs.add("--username=Wurst-Bot")
114118
}

src/gametest/java/net/wimods/chestesp/gametest/ChestESPTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import net.fabricmc.fabric.api.client.gametest.v1.context.TestServerContext;
2525
import net.fabricmc.fabric.api.client.gametest.v1.context.TestSingleplayerContext;
2626
import net.fabricmc.fabric.api.client.gametest.v1.world.TestWorldBuilder;
27+
import net.fabricmc.fabric.impl.client.gametest.TestSystemProperties;
2728
import net.minecraft.SharedConstants;
2829
import net.minecraft.client.gui.screens.worldselection.WorldCreationUiState;
2930
import net.minecraft.world.level.gamerules.GameRules;
@@ -41,6 +42,9 @@ public final class ChestESPTest implements FabricClientGameTest
4142
@Override
4243
public void runTest(ClientGameTestContext context)
4344
{
45+
if(!TestSystemProperties.DISABLE_NETWORK_SYNCHRONIZER)
46+
throw new RuntimeException("Network synchronizer is not disabled");
47+
4448
LOGGER.info("Starting ChestESP Client GameTest");
4549
hideSplashTexts(context);
4650
waitForTitleScreenFade(context);

0 commit comments

Comments
 (0)