Skip to content

Commit

Permalink
[1.21] Fix FishingHookRendererMixin crash. (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
MerchantPug authored Aug 25, 2024
1 parent 0ae60c3 commit 0469a56
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0469a56

Please sign in to comment.