From 08fbc8619cfe24f00334b3c4c82afa29a771b5bc Mon Sep 17 00:00:00 2001 From: joe Date: Sat, 30 Nov 2024 16:15:11 +0000 Subject: [PATCH] Add todo for suggestion of runOnClient when API methods are added --- .../fabric/test/base/client/mixin/MinecraftClientMixin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/fabric-api-base/src/testmodClient/java/net/fabricmc/fabric/test/base/client/mixin/MinecraftClientMixin.java b/fabric-api-base/src/testmodClient/java/net/fabricmc/fabric/test/base/client/mixin/MinecraftClientMixin.java index d08bf1ac89..137d4defa5 100644 --- a/fabric-api-base/src/testmodClient/java/net/fabricmc/fabric/test/base/client/mixin/MinecraftClientMixin.java +++ b/fabric-api-base/src/testmodClient/java/net/fabricmc/fabric/test/base/client/mixin/MinecraftClientMixin.java @@ -143,6 +143,7 @@ private void onDisconnectBusyWait(CallbackInfo ci) { @Inject(method = "getInstance", at = @At("HEAD")) private static void checkThreadOnGetInstance(CallbackInfoReturnable cir) { if (FabricApiAutoTestClient.IS_AUTO_TEST) { + // TODO: add suggestion of runOnClient etc when API methods are added Preconditions.checkState(Thread.currentThread() != ThreadingImpl.testThread, "MinecraftClient.getInstance() cannot be called from the test thread"); } }