diff --git a/src/main/java/net/wurstclient/mixin/BasicBakedModelMixin.java b/src/main/java/net/wurstclient/mixin/BasicBakedModelMixin.java index 2372f0a0a9..838b84ed8b 100644 --- a/src/main/java/net/wurstclient/mixin/BasicBakedModelMixin.java +++ b/src/main/java/net/wurstclient/mixin/BasicBakedModelMixin.java @@ -27,6 +27,10 @@ @Mixin(BasicBakedModel.class) public class BasicBakedModelMixin { + /** + * This mixin hides blocks like grass and snow when using X-Ray. It works + * with and without Sodium installed. + */ @Inject(at = @At("HEAD"), method = "getQuads", cancellable = true) private void getQuads(@Nullable BlockState state, @Nullable Direction face, Random random, CallbackInfoReturnable> cir) diff --git a/src/main/java/net/wurstclient/mixin/BlockMixin.java b/src/main/java/net/wurstclient/mixin/BlockMixin.java index ca1c5ad976..c5936a18e7 100644 --- a/src/main/java/net/wurstclient/mixin/BlockMixin.java +++ b/src/main/java/net/wurstclient/mixin/BlockMixin.java @@ -26,6 +26,10 @@ @Mixin(Block.class) public abstract class BlockMixin implements ItemConvertible { + /** + * This mixin allows X-Ray to show ores that would normally be obstructed by + * other blocks. + */ @Inject(at = @At("HEAD"), method = "shouldDrawSide(Lnet/minecraft/block/BlockState;Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;Lnet/minecraft/util/math/BlockPos;)Z", cancellable = true) diff --git a/src/main/java/net/wurstclient/mixin/BlockModelRendererMixin.java b/src/main/java/net/wurstclient/mixin/BlockModelRendererMixin.java index 03cbd0f665..a620fb47da 100644 --- a/src/main/java/net/wurstclient/mixin/BlockModelRendererMixin.java +++ b/src/main/java/net/wurstclient/mixin/BlockModelRendererMixin.java @@ -28,6 +28,12 @@ @Mixin(BlockModelRenderer.class) public abstract class BlockModelRendererMixin { + /** + * This mixin hides and shows blocks when using X-Ray with OptiFine + * installed. + * + * TODO: Does {@link BasicBakedModelMixin} make this mixin redundant? + */ @Inject(at = @At("HEAD"), method = { "renderSmooth(Lnet/minecraft/world/BlockRenderView;Lnet/minecraft/client/render/model/BakedModel;Lnet/minecraft/block/BlockState;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;ZLnet/minecraft/util/math/random/Random;JI)V", diff --git a/src/main/java/net/wurstclient/mixin/FluidRendererMixin.java b/src/main/java/net/wurstclient/mixin/FluidRendererMixin.java index e14efae00e..ce119c4401 100644 --- a/src/main/java/net/wurstclient/mixin/FluidRendererMixin.java +++ b/src/main/java/net/wurstclient/mixin/FluidRendererMixin.java @@ -23,6 +23,10 @@ @Mixin(FluidRenderer.class) public class FluidRendererMixin { + /** + * This mixin hides and shows fluids when using X-Ray without Sodium + * installed. + */ @Inject(at = @At("HEAD"), method = "isSideCovered(Lnet/minecraft/world/BlockView;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/math/Direction;FLnet/minecraft/block/BlockState;)Z", cancellable = true) diff --git a/src/main/java/net/wurstclient/mixin/MultipartBakedModelMixin.java b/src/main/java/net/wurstclient/mixin/MultipartBakedModelMixin.java index 82f3533790..785a5cc126 100644 --- a/src/main/java/net/wurstclient/mixin/MultipartBakedModelMixin.java +++ b/src/main/java/net/wurstclient/mixin/MultipartBakedModelMixin.java @@ -27,6 +27,9 @@ @Mixin(MultipartBakedModel.class) public class MultipartBakedModelMixin { + /** + * TODO: This mixin doesn't seem to do anything? + */ @Inject(at = @At("HEAD"), method = "getQuads", cancellable = true) private void getQuads(@Nullable BlockState state, @Nullable Direction face, Random random, CallbackInfoReturnable> cir) diff --git a/src/main/java/net/wurstclient/mixin/SodiumBlockOcclusionCacheMixin.java b/src/main/java/net/wurstclient/mixin/SodiumBlockOcclusionCacheMixin.java index 08bce6047b..cd36e13c56 100644 --- a/src/main/java/net/wurstclient/mixin/SodiumBlockOcclusionCacheMixin.java +++ b/src/main/java/net/wurstclient/mixin/SodiumBlockOcclusionCacheMixin.java @@ -29,6 +29,10 @@ remap = false) public class SodiumBlockOcclusionCacheMixin { + /** + * This mixin hides and shows regular full blocks when using X-Ray with + * Sodium installed. + */ @Inject(at = @At("HEAD"), method = "shouldDrawSide", cancellable = true) public void shouldDrawSide(BlockState state, BlockView world, BlockPos pos, Direction side, CallbackInfoReturnable cir) diff --git a/src/main/java/net/wurstclient/mixin/SodiumFluidRendererMixin.java b/src/main/java/net/wurstclient/mixin/SodiumFluidRendererMixin.java index 4c6aebe3bc..550debc194 100644 --- a/src/main/java/net/wurstclient/mixin/SodiumFluidRendererMixin.java +++ b/src/main/java/net/wurstclient/mixin/SodiumFluidRendererMixin.java @@ -29,6 +29,9 @@ remap = false) public class SodiumFluidRendererMixin { + /** + * This mixin hides and shows fluids when using X-Ray with Sodium installed. + */ @Inject(at = @At("HEAD"), method = "isSideExposed", cancellable = true) private void isSideExposed(BlockRenderView world, int x, int y, int z, Direction dir, float height, CallbackInfoReturnable cir) diff --git a/src/main/java/net/wurstclient/mixin/TerrainRenderContextMixin.java b/src/main/java/net/wurstclient/mixin/TerrainRenderContextMixin.java index 8812de7e33..febe55df43 100644 --- a/src/main/java/net/wurstclient/mixin/TerrainRenderContextMixin.java +++ b/src/main/java/net/wurstclient/mixin/TerrainRenderContextMixin.java @@ -31,6 +31,8 @@ public class TerrainRenderContextMixin *

* We could make this optional to stop the game from crashing, but then * X-Ray would silently stop working and it would be much harder to debug. + * + * TODO: {@link BasicBakedModelMixin} makes this mixin redundant. */ @Inject(at = @At("HEAD"), method = "tessellateBlock", diff --git a/src/main/java/net/wurstclient/mixin/WeightedBakedModelMixin.java b/src/main/java/net/wurstclient/mixin/WeightedBakedModelMixin.java index 47da29f304..f82ca82615 100644 --- a/src/main/java/net/wurstclient/mixin/WeightedBakedModelMixin.java +++ b/src/main/java/net/wurstclient/mixin/WeightedBakedModelMixin.java @@ -27,6 +27,9 @@ @Mixin(WeightedBakedModel.class) public class WeightedBakedModelMixin { + /** + * TODO: This mixin doesn't seem to do anything? + */ @Inject(at = @At("HEAD"), method = "getQuads", cancellable = true) private void getQuads(@Nullable BlockState state, @Nullable Direction face, Random random, CallbackInfoReturnable> cir)