From 0469a56df22543e3e645c50ce789287c44209e72 Mon Sep 17 00:00:00 2001 From: Pug <81167232+MerchantPug@users.noreply.github.com> Date: Mon, 26 Aug 2024 02:12:50 +1000 Subject: [PATCH] [1.21] Fix FishingHookRendererMixin crash. (#126) --- .../porting_lib/tool/mixin/FishingHookRendererMixin.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/item_abilities/src/main/java/io/github/fabricators_of_create/porting_lib/tool/mixin/FishingHookRendererMixin.java b/modules/item_abilities/src/main/java/io/github/fabricators_of_create/porting_lib/tool/mixin/FishingHookRendererMixin.java index 633d6998..3a56dcf1 100644 --- a/modules/item_abilities/src/main/java/io/github/fabricators_of_create/porting_lib/tool/mixin/FishingHookRendererMixin.java +++ b/modules/item_abilities/src/main/java/io/github/fabricators_of_create/porting_lib/tool/mixin/FishingHookRendererMixin.java @@ -15,8 +15,8 @@ @Mixin(FishingHookRenderer.class) public class FishingHookRendererMixin { - @ModifyExpressionValue(method = "render(Lnet/minecraft/world/entity/projectile/FishingHook;FFLcom/mojang/blaze3d/vertex/PoseStack;Lnet/minecraft/client/renderer/MultiBufferSource;I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;is(Lnet/minecraft/world/item/Item;)Z")) - private boolean toolActionFishingHook(boolean original, @Local(index = 13) ItemStack stack) { + @ModifyExpressionValue(method = "getPlayerHandPos", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/item/ItemStack;is(Lnet/minecraft/world/item/Item;)Z")) + private boolean toolActionFishingHook(boolean original, @Local ItemStack stack) { if (stack.getItem() instanceof ItemAbilityItem) return stack.canPerformAction(ItemAbilities.FISHING_ROD_CAST); return original;