@@ -31,7 +31,6 @@ public static void testXRayHack(ClientGameTestContext context,
3131 TestClientWorldContext world = spContext .getClientWorld ();
3232 TestServerContext server = spContext .getServer ();
3333 buildTestRig (context , spContext );
34- clearChat (context );
3534
3635 // Enable X-Ray with default settings
3736 runWurstCommand (context , "setcheckbox X-Ray only_show_exposed off" );
@@ -41,47 +40,43 @@ public static void testXRayHack(ClientGameTestContext context,
4140 assertScreenshotEquals (context , "xray_default" ,
4241 WurstTest .IS_MOD_COMPAT_TEST ? "https://i.imgur.com/02KZHLm.png"
4342 : "https://i.imgur.com/Dftamqv.png" );
44- input .pressKey (GLFW .GLFW_KEY_X );
45- clearChat (context );
4643
4744 // Exposed only
4845 runWurstCommand (context , "setcheckbox X-Ray only_show_exposed on" );
4946 runWurstCommand (context , "setslider X-Ray opacity 0" );
5047 input .pressKey (GLFW .GLFW_KEY_X );
48+ input .pressKey (GLFW .GLFW_KEY_X );
5149 waitForChunkReloading (context , world );
5250 assertScreenshotEquals (context , "xray_exposed_only" ,
5351 WurstTest .IS_MOD_COMPAT_TEST ? "https://i.imgur.com/xplrJwM.png"
5452 : "https://i.imgur.com/QlEpQTu.png" );
55- input .pressKey (GLFW .GLFW_KEY_X );
56- clearChat (context );
5753
5854 // Opacity mode
5955 runWurstCommand (context , "setcheckbox X-Ray only_show_exposed off" );
6056 runWurstCommand (context , "setslider X-Ray opacity 0.5" );
6157 input .pressKey (GLFW .GLFW_KEY_X );
58+ input .pressKey (GLFW .GLFW_KEY_X );
6259 waitForChunkReloading (context , world );
6360 assertScreenshotEquals (context , "xray_opacity" ,
6461 WurstTest .IS_MOD_COMPAT_TEST ? "https://i.imgur.com/MFc821z.png"
6562 : "https://i.imgur.com/0nLulJn.png" );
66- input .pressKey (GLFW .GLFW_KEY_X );
67- clearChat (context );
6863
6964 // Exposed only + opacity
7065 runWurstCommand (context , "setcheckbox X-Ray only_show_exposed on" );
7166 runWurstCommand (context , "setslider X-Ray opacity 0.5" );
7267 input .pressKey (GLFW .GLFW_KEY_X );
68+ input .pressKey (GLFW .GLFW_KEY_X );
7369 waitForChunkReloading (context , world );
7470 assertScreenshotEquals (context , "xray_exposed_only_opacity" ,
7571 WurstTest .IS_MOD_COMPAT_TEST ? "https://i.imgur.com/GRHgW6P.png"
7672 : "https://i.imgur.com/noPWDUl.png" );
77- input .pressKey (GLFW .GLFW_KEY_X );
78- clearChat (context );
7973
8074 // Clean up
8175 runCommand (server , "fill ~-5 ~-2 ~5 ~5 ~5 ~7 air" );
8276 waitForBlock (context , 5 , 5 , 7 , Blocks .AIR );
8377 runWurstCommand (context , "setcheckbox X-Ray only_show_exposed off" );
8478 runWurstCommand (context , "setslider X-Ray opacity 0" );
79+ input .pressKey (GLFW .GLFW_KEY_X );
8580 waitForChunkReloading (context , world );
8681 clearChat (context );
8782 }
@@ -115,6 +110,7 @@ private static void buildTestRig(ClientGameTestContext context,
115110 // Wait for blocks to appear
116111 waitForBlock (context , -1 , 0 , 6 , Blocks .LAVA );
117112 waitForChunkReloading (context , world );
113+ clearChat (context );
118114 }
119115
120116 private static void waitForChunkReloading (ClientGameTestContext context ,
0 commit comments