Skip to content

Commit 0db8877

Browse files
Merge branch '1.21.8' into 1.21.4
2 parents 5477207 + 50da4d1 commit 0db8877

File tree

11 files changed

+52
-44
lines changed

11 files changed

+52
-44
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ loom_version=1.13-SNAPSHOT
1515
fabric_version=0.119.4+1.21.4
1616

1717
# Mod Properties
18-
mod_version=v7.51-MC1.21.4
18+
mod_version=v7.51.1-MC1.21.4
1919
maven_group=net.wurstclient
2020
archives_base_name=Wurst-Client
2121
mod_loader=Fabric

src/gametest/java/net/wurstclient/gametest/tests/AutoMineHackTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public static void testAutoMineHack(ClientGameTestContext context,
4242
runCommand(server, "gamemode creative");
4343
runCommand(server, "kill @e[type=item]");
4444
clearInventory(context);
45+
context.waitTick();
4546
clearParticles(context);
4647
clearChat(context);
4748
context.waitTick();

src/gametest/java/net/wurstclient/gametest/tests/XRayHackTest.java

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -31,63 +31,53 @@ 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");
3837
runWurstCommand(context, "setslider X-Ray opacity 0");
3938
input.pressKey(GLFW.GLFW_KEY_X);
40-
context.waitTick();
41-
world.waitForChunksRender();
39+
waitForChunkReloading(context, world);
4240
assertScreenshotEquals(context, "xray_default",
4341
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/02KZHLm.png"
4442
: "https://i.imgur.com/Dftamqv.png");
45-
input.pressKey(GLFW.GLFW_KEY_X);
46-
clearChat(context);
4743

4844
// Exposed only
4945
runWurstCommand(context, "setcheckbox X-Ray only_show_exposed on");
5046
runWurstCommand(context, "setslider X-Ray opacity 0");
5147
input.pressKey(GLFW.GLFW_KEY_X);
52-
context.waitTick();
53-
world.waitForChunksRender();
48+
input.pressKey(GLFW.GLFW_KEY_X);
49+
waitForChunkReloading(context, world);
5450
assertScreenshotEquals(context, "xray_exposed_only",
5551
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/xplrJwM.png"
5652
: "https://i.imgur.com/QlEpQTu.png");
57-
input.pressKey(GLFW.GLFW_KEY_X);
58-
clearChat(context);
5953

6054
// Opacity mode
6155
runWurstCommand(context, "setcheckbox X-Ray only_show_exposed off");
6256
runWurstCommand(context, "setslider X-Ray opacity 0.5");
6357
input.pressKey(GLFW.GLFW_KEY_X);
64-
context.waitTick();
65-
world.waitForChunksRender();
58+
input.pressKey(GLFW.GLFW_KEY_X);
59+
waitForChunkReloading(context, world);
6660
assertScreenshotEquals(context, "xray_opacity",
6761
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/MFc821z.png"
6862
: "https://i.imgur.com/0nLulJn.png");
69-
input.pressKey(GLFW.GLFW_KEY_X);
70-
clearChat(context);
7163

7264
// Exposed only + opacity
7365
runWurstCommand(context, "setcheckbox X-Ray only_show_exposed on");
7466
runWurstCommand(context, "setslider X-Ray opacity 0.5");
7567
input.pressKey(GLFW.GLFW_KEY_X);
76-
context.waitTick();
77-
world.waitForChunksRender();
68+
input.pressKey(GLFW.GLFW_KEY_X);
69+
waitForChunkReloading(context, world);
7870
assertScreenshotEquals(context, "xray_exposed_only_opacity",
7971
WurstTest.IS_MOD_COMPAT_TEST ? "https://i.imgur.com/GRHgW6P.png"
8072
: "https://i.imgur.com/noPWDUl.png");
81-
input.pressKey(GLFW.GLFW_KEY_X);
82-
clearChat(context);
8373

8474
// Clean up
8575
runCommand(server, "fill ~-5 ~-2 ~5 ~5 ~5 ~7 air");
8676
waitForBlock(context, 5, 5, 7, Blocks.AIR);
8777
runWurstCommand(context, "setcheckbox X-Ray only_show_exposed off");
8878
runWurstCommand(context, "setslider X-Ray opacity 0");
89-
context.waitTick();
90-
world.waitForChunksRender();
79+
input.pressKey(GLFW.GLFW_KEY_X);
80+
waitForChunkReloading(context, world);
9181
clearChat(context);
9282
}
9383

@@ -119,7 +109,16 @@ private static void buildTestRig(ClientGameTestContext context,
119109

120110
// Wait for blocks to appear
121111
waitForBlock(context, -1, 0, 6, Blocks.LAVA);
122-
context.waitTick();
112+
waitForChunkReloading(context, world);
113+
clearChat(context);
114+
}
115+
116+
private static void waitForChunkReloading(ClientGameTestContext context,
117+
TestClientWorldContext world)
118+
{
119+
// Wait longer if testing with Sodium, since we can't rely on
120+
// waitForChunksRender() to track when Sodium finishes loading chunks
121+
context.waitTicks(WurstTest.IS_MOD_COMPAT_TEST ? 5 : 1);
123122
world.waitForChunksRender();
124123
}
125124
}

src/main/java/net/wurstclient/WurstClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public enum WurstClient
5050
public static MinecraftClient MC;
5151
public static IMinecraftClient IMC;
5252

53-
public static final String VERSION = "7.51";
53+
public static final String VERSION = "7.51.1";
5454
public static final String MC_VERSION = "1.21.4";
5555

5656
private PlausibleAnalytics plausible;

src/main/java/net/wurstclient/mixin/AbstractBlockRenderContextMixin.java renamed to src/main/java/net/wurstclient/mixin/indigo/AbstractBlockRenderContextMixin.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,25 @@
55
* License, version 3. If a copy of the GPL was not distributed with this
66
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
77
*/
8-
package net.wurstclient.mixin;
8+
package net.wurstclient.mixin.indigo;
99

1010
import org.spongepowered.asm.mixin.Final;
1111
import org.spongepowered.asm.mixin.Mixin;
12+
import org.spongepowered.asm.mixin.Pseudo;
1213
import org.spongepowered.asm.mixin.Shadow;
1314
import org.spongepowered.asm.mixin.injection.At;
1415
import org.spongepowered.asm.mixin.injection.Inject;
1516
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
1617

1718
import net.fabricmc.fabric.impl.client.indigo.renderer.mesh.MutableQuadViewImpl;
18-
import net.fabricmc.fabric.impl.client.indigo.renderer.render.AbstractBlockRenderContext;
1919
import net.fabricmc.fabric.impl.client.indigo.renderer.render.BlockRenderInfo;
2020
import net.wurstclient.WurstClient;
2121
import net.wurstclient.hacks.XRayHack;
2222

23-
@Mixin(value = AbstractBlockRenderContext.class, remap = false)
23+
@Pseudo
24+
@Mixin(
25+
targets = "net.fabricmc.fabric.impl.client.indigo.renderer.render.AbstractBlockRenderContext",
26+
remap = false)
2427
public abstract class AbstractBlockRenderContextMixin
2528
{
2629
@Shadow

src/main/java/net/wurstclient/mixin/BlockRenderInfoMixin.java renamed to src/main/java/net/wurstclient/mixin/indigo/BlockRenderInfoMixin.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,25 @@
55
* License, version 3. If a copy of the GPL was not distributed with this
66
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
77
*/
8-
package net.wurstclient.mixin;
8+
package net.wurstclient.mixin.indigo;
99

1010
import org.spongepowered.asm.mixin.Mixin;
11+
import org.spongepowered.asm.mixin.Pseudo;
1112
import org.spongepowered.asm.mixin.Shadow;
1213
import org.spongepowered.asm.mixin.injection.At;
1314
import org.spongepowered.asm.mixin.injection.Inject;
1415
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
1516

16-
import net.fabricmc.fabric.impl.client.indigo.renderer.render.BlockRenderInfo;
1717
import net.minecraft.block.BlockState;
1818
import net.minecraft.util.math.BlockPos;
1919
import net.minecraft.util.math.Direction;
2020
import net.wurstclient.event.EventManager;
2121
import net.wurstclient.events.ShouldDrawSideListener.ShouldDrawSideEvent;
2222

23-
@Mixin(value = BlockRenderInfo.class, remap = false)
23+
@Pseudo
24+
@Mixin(
25+
targets = "net.fabricmc.fabric.impl.client.indigo.renderer.render.BlockRenderInfo",
26+
remap = false)
2427
public abstract class BlockRenderInfoMixin
2528
{
2629
@Shadow
@@ -32,7 +35,10 @@ public abstract class BlockRenderInfoMixin
3235
* This mixin hides and shows regular blocks when using X-Ray, if Indigo
3336
* is running and Sodium is not installed.
3437
*/
35-
@Inject(at = @At("HEAD"), method = "shouldDrawSide", cancellable = true)
38+
@Inject(at = @At("HEAD"),
39+
method = "shouldDrawSide",
40+
require = 0,
41+
cancellable = true)
3642
private void onShouldDrawSide(Direction face,
3743
CallbackInfoReturnable<Boolean> cir)
3844
{

src/main/java/net/wurstclient/mixin/SodiumAbstractBlockRenderContextMixin.java renamed to src/main/java/net/wurstclient/mixin/sodium/AbstractBlockRenderContextMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* License, version 3. If a copy of the GPL was not distributed with this
66
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
77
*/
8-
package net.wurstclient.mixin;
8+
package net.wurstclient.mixin.sodium;
99

1010
import org.jetbrains.annotations.Nullable;
1111
import org.spongepowered.asm.mixin.Mixin;
@@ -29,7 +29,7 @@
2929
@Pseudo
3030
@Mixin(targets = {
3131
"net.caffeinemc.mods.sodium.client.render.frapi.render.AbstractBlockRenderContext"})
32-
public class SodiumAbstractBlockRenderContextMixin
32+
public class AbstractBlockRenderContextMixin
3333
{
3434
@Shadow
3535
protected BlockState state;

src/main/java/net/wurstclient/mixin/SodiumBlockOcclusionCacheMixin.java renamed to src/main/java/net/wurstclient/mixin/sodium/BlockOcclusionCacheMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* License, version 3. If a copy of the GPL was not distributed with this
66
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
77
*/
8-
package net.wurstclient.mixin;
8+
package net.wurstclient.mixin.sodium;
99

1010
import org.spongepowered.asm.mixin.Mixin;
1111
import org.spongepowered.asm.mixin.Pseudo;
@@ -24,7 +24,7 @@
2424
@Mixin(targets = {
2525
"net.caffeinemc.mods.sodium.client.render.chunk.compile.pipeline.BlockOcclusionCache"},
2626
remap = false)
27-
public class SodiumBlockOcclusionCacheMixin
27+
public class BlockOcclusionCacheMixin
2828
{
2929
/**
3030
* This mixin hides and shows regular full blocks when using X-Ray with

src/main/java/net/wurstclient/mixin/SodiumBlockRendererMixin.java renamed to src/main/java/net/wurstclient/mixin/sodium/BlockRendererMixin.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* License, version 3. If a copy of the GPL was not distributed with this
66
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
77
*/
8-
package net.wurstclient.mixin;
8+
package net.wurstclient.mixin.sodium;
99

1010
import org.spongepowered.asm.mixin.Mixin;
1111
import org.spongepowered.asm.mixin.Pseudo;
@@ -25,8 +25,7 @@
2525
@Mixin(targets = {
2626
"net.caffeinemc.mods.sodium.client.render.chunk.compile.pipeline.BlockRenderer"},
2727
remap = false)
28-
public class SodiumBlockRendererMixin
29-
extends SodiumAbstractBlockRenderContextMixin
28+
public class BlockRendererMixin extends AbstractBlockRenderContextMixin
3029
{
3130
/**
3231
* Modifies opacity of blocks when using X-Ray with Sodium installed.

src/main/java/net/wurstclient/mixin/SodiumDefaultFluidRendererMixin.java renamed to src/main/java/net/wurstclient/mixin/sodium/DefaultFluidRendererMixin.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* License, version 3. If a copy of the GPL was not distributed with this
66
* file, You can obtain one at: https://www.gnu.org/licenses/gpl-3.0.txt
77
*/
8-
package net.wurstclient.mixin;
8+
package net.wurstclient.mixin.sodium;
99

1010
import org.spongepowered.asm.mixin.Mixin;
1111
import org.spongepowered.asm.mixin.Pseudo;
@@ -32,7 +32,7 @@
3232
@Mixin(targets = {
3333
"net.caffeinemc.mods.sodium.client.render.chunk.compile.pipeline.DefaultFluidRenderer"},
3434
remap = false)
35-
public class SodiumDefaultFluidRendererMixin
35+
public class DefaultFluidRendererMixin
3636
{
3737
@Unique
3838
private ThreadLocal<BlockPos.Mutable> mutablePosForExposedCheck =

0 commit comments

Comments
 (0)