Jump to content

[1.19.2] Custom mobs use fishing rods


Recommended Posts


Does anyone know a way that I can let custom entities use a fishing rod. I've referenced the bow class and associated classes, however similar classes that involve a projectile don't require a player as a parameter, but just a living entity. Both the FishingRodItem and the FishingHook classes require a Player specifically as a parameter either to use the item, or in the constructor to create the projectile. Any help is greatly appreciated.

Link to comment
Share on other sites

Unfortunately, you cannot have a custom entity use a fishing rod unless you remake part of the fishing rod. You can get away with not calling the `#use` method on the rod item, but you would need to spawn your own fishing hook entity and update the logic associated with it. It would probably be best to make this as part of a Goal or Behavior..

Link to comment
Share on other sites

I do plan on making this as part of a goal. The problem is actually assigning the fishing hook entity to the custom entity, seeing as the constructor of the fishing hook calls for a player as well on creation... unless there is a workaround to this. I will probably make a custom rod/projectile instead, thanks for your help!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.