Skip to content

Commit 7e901e2

Browse files
fix MC-211561 (#435)
* fix MC-211561 * use an instanceof check for better mod compatibility
1 parent 7972d05 commit 7e901e2

3 files changed

Lines changed: 22 additions & 0 deletions

File tree

PATCHED.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
| Basic | [MC-176559](https://bugs.mojang.com/browse/MC-176559) | Breaking process resets when a pickaxe enchanted with Mending mends by XP / Mending slows down breaking blocks again |
2525
| Basic | [MC-183776](https://bugs.mojang.com/browse/MC-183776) | After switching gamemodes using F3+F4, you need to press F3 twice to toggle the debug screen |
2626
| Basic | [MC-197260](https://bugs.mojang.com/browse/MC-197260) | Armor Stand renders itself and armor dark if its head is in a solid block |
27+
| Basic | [MC-211561](https://bugs.mojang.com/browse/MC-211561) | Fishing line appears in opposite hand when switching slots |
2728
| Basic | [MC-215531](https://bugs.mojang.com/browse/MC-215531) | The carved pumpkin overlay isn't removed when switching into spectator mode |
2829
| Basic | [MC-217716](https://bugs.mojang.com/browse/MC-217716) | The green nausea overlay isn't removed when switching into spectator mode |
2930
| 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 |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package dev.isxander.debugify.client.mixins.basic.mc211561;
2+
3+
import com.llamalad7.mixinextras.injector.ModifyReturnValue;
4+
import dev.isxander.debugify.fixes.BugFix;
5+
import dev.isxander.debugify.fixes.FixCategory;
6+
import net.minecraft.client.renderer.entity.FishingHookRenderer;
7+
import net.minecraft.world.entity.HumanoidArm;
8+
import net.minecraft.world.entity.player.Player;
9+
import net.minecraft.world.item.FishingRodItem;
10+
import org.spongepowered.asm.mixin.Mixin;
11+
import org.spongepowered.asm.mixin.injection.At;
12+
13+
@BugFix(id = "MC-211561", category = FixCategory.BASIC, env = BugFix.Env.CLIENT, description = "Fishing line appears in opposite hand when switching slots")
14+
@Mixin(FishingHookRenderer.class)
15+
public class FishingHookRendererMixin {
16+
@ModifyReturnValue(method = "getHoldingArm", at = @At("RETURN"))
17+
private static HumanoidArm fixHoldingArm(HumanoidArm original, Player player) {
18+
return player.getOffhandItem().getItem() instanceof FishingRodItem ? original : player.getMainArm();
19+
}
20+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"basic.mc183776.KeyboardHandlerMixin",
2121
"basic.mc197260.ArmorStandRendererMixin",
2222
"basic.mc197260.LivingEntityRendererMixin",
23+
"basic.mc211561.FishingHookRendererMixin",
2324
"basic.mc215531.GuiMixin",
2425
"basic.mc217716.GameRendererMixin",
2526
"basic.mc22882.AbstractContainerScreenMixin",

0 commit comments

Comments
 (0)