Skip to content

Commit 6619c8c

Browse files
fix MC-267376
1 parent e4c2c56 commit 6619c8c

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

PATCHED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
| Basic | [MC-217716](https://bugs.mojang.com/browse/MC-217716) | The green nausea overlay isn't removed when switching into spectator mode |
2929
| Basic | [MC-231097](https://bugs.mojang.com/browse/MC-231097) | Holding the "Use" button continues to slow down the player even after the used item has been dropped |
3030
| Basic | [MC-237493](https://bugs.mojang.com/browse/MC-237493) | Telemetry cannot be disabled |
31+
| Basic | [MC-267376](https://bugs.mojang.com/browse/MC-267376) | You can view through blocks on small scales (near plane clipping) |
3132

3233
### Server Side (Both)
3334
| Type | Bug ID | Name |
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package dev.isxander.debugify.client.mixins.basic.mc267376;
2+
3+
import com.llamalad7.mixinextras.injector.ModifyExpressionValue;
4+
import dev.isxander.debugify.fixes.BugFix;
5+
import dev.isxander.debugify.fixes.FixCategory;
6+
import net.minecraft.client.Minecraft;
7+
import net.minecraft.client.renderer.GameRenderer;
8+
import org.spongepowered.asm.mixin.Mixin;
9+
import org.spongepowered.asm.mixin.injection.At;
10+
11+
@BugFix(id = "MC-267376", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, description = "You can view through blocks on small scales (near plane clipping)")
12+
@Mixin(GameRenderer.class)
13+
public class GameRendererMixin {
14+
@ModifyExpressionValue(method = "getProjectionMatrix", at = @At(value = "CONSTANT", args = "floatValue=0.05F"))
15+
private float scaleNearClipDistance(float original) {
16+
return original * Math.min(Minecraft.getInstance().player.getScale(), 1F);
17+
}
18+
}

src/client/resources/debugify.client.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"basic.mc237493.TelemetryEventWidgetMixin",
3131
"basic.mc237493.TelemetryInfoScreenMixin",
3232
"basic.mc263865.KeyboardHandlerMixin",
33+
"basic.mc267376.GameRendererMixin",
3334
"basic.mc4490.FishingHookRendererMixin",
3435
"basic.mc46503.ClientPacketListenerMixin",
3536
"basic.mc46766.MinecraftMixin",

0 commit comments

Comments
 (0)