Entities cannot be hooked by fishing rods if the line is cast while the player (or caster in general) is submerged in water.
Steps to Reproduce:
Spawn an entity underwater
Try and hook the entity with a fishing rod item
Observed Results:
The line will be cast, but will not latch onto the entity. Instead, it will function like you are normally fishing.
Expected Results:
The bobber would be able to latch onto the entity regardless of submersion.
Screenshots/Videos:
[media][media]
Notes:
Considering the player is unable to fish while the bobber is underwater, it would make sense that the bobber function as it would above land when trying to hook an entity.
Linked issues
Attachments
Comments 10
Can confirm in 23w44a. I would like to request ownership considering the original poster has been inactive since 2021.
Hi, if it still affects current versions, it would have helped if you'd kept your issue up-to-date so we know it's still valid. That's why ownership has been transferred to @unknown to make sure it stays up to date in the future.
It seems this issue is caused by the fact that collision checks are only made during the initial state ("FLYING").
Once the bobber enters a block that has water in it (it seems it doesn't even need to touch the water, just be on the same block), it changes to the "BOBBING" stage. Once that has happened, there seems to be no branch in the code to change the state ever again. That means that it just is in BOBBING state forever. Thus, the collsiion check is never reached, causing it not to attach to an entity.
Can confirm.