Skip to content

Commit ee9f4fe

Browse files
fix MC-46737
1 parent e4c2c56 commit ee9f4fe

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

PATCHED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
| Basic | [MC-4490](https://bugs.mojang.com/browse/MC-4490) | Fishing line not attached to fishing rod in third person while crouching |
88
| Basic | [MC-22882](https://bugs.mojang.com/browse/MC-22882) | Ctrl + Q won't work on Mac (disabled by default) |
99
| Basic | [MC-46503](https://bugs.mojang.com/browse/MC-46503) | You can retain a mob's shader in spectator mode by running /kill |
10+
| Basic | [MC-46737](https://bugs.mojang.com/browse/MC-46737) | Entities' shaders are applied when beginning to spectate them in third person |
1011
| Basic | [MC-46766](https://bugs.mojang.com/browse/MC-46766) | Mining a block in Survival, then changing to Spectator creates a breaking animation and sound |
1112
| Basic | [MC-59810](https://bugs.mojang.com/browse/MC-59810) | Cannot break blocks while sprinting (Ctrl+Click = right click on macOS) *(macOS only)* |
1213
| Basic | [MC-79545](https://bugs.mojang.com/browse/MC-79545) | The experience bar disappears when too many levels are given to the player |
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package dev.isxander.debugify.client.mixins.basic.mc46737;
2+
3+
import com.llamalad7.mixinextras.injector.v2.WrapWithCondition;
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 net.minecraft.resources.ResourceLocation;
9+
import org.spongepowered.asm.mixin.Mixin;
10+
import org.spongepowered.asm.mixin.injection.At;
11+
12+
@BugFix(id = "MC-46737", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, description = "Entities' shaders are applied when beginning to spectate them in third person")
13+
@Mixin(GameRenderer.class)
14+
public class GameRendererMixin {
15+
@WrapWithCondition(method = "checkEntityPostEffect", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/GameRenderer;setPostEffect(Lnet/minecraft/resources/ResourceLocation;)V"))
16+
private boolean thirdPersonCheck(GameRenderer renderer, ResourceLocation location) {
17+
return Minecraft.getInstance().options.getCameraType().isFirstPerson();
18+
}
19+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"basic.mc263865.KeyboardHandlerMixin",
3333
"basic.mc4490.FishingHookRendererMixin",
3434
"basic.mc46503.ClientPacketListenerMixin",
35+
"basic.mc46737.GameRendererMixin",
3536
"basic.mc46766.MinecraftMixin",
3637
"basic.mc577.AbstractContainerScreenMixin",
3738
"basic.mc59810.MouseHandlerMixin",

0 commit comments

Comments
 (0)