Mob Fishing Rod ++
CAD97 opened this issue ยท 2 comments
The Mob Fishing Rod should function more like a Fishing Rod and less like an Iron Sword.
Ideal use:
- Put Mob Fishing Rod in the off-hand
- Cast it (as a Fishing Rod) at a mob you want to catch
- Kill the mob with whatever you have in your main hand
- If a mob dies while hooked by the Mob Fishing Rod, it drops Essence of Mob
- Mob Fishing Rod takes 1 point of durability damage per cast and per catch.
- Mob Fishing Rod cannot be cast when doing so would break it.
- Mob Fishing Rod can be repaired in the anvil.
Prerequisites
MC-83185 needs to be fixed, or I need to rewrite the entire fishing code manually and fix it for the Mob Fishing Rod.
"Put Mob Fishing Rod in the off-hand". Forge has issues with hands currently like this MinecraftForge/MinecraftForge#3221 . I am not sure if it's possible unless you use item interact event and even then that event handler may be bugged as well. go bother them over there with your issues so they will make it a priority. You could try in your item class on right click but, I am not sure if it's going to work.
@jredfox, unfortunately, MC-83185 precludes me any work on this. This issue is fixed in 1.11, so when Forge updates to 1.11 I can come back to this enhancement.
I might not even need to touch the linked issue, as I suspect the handler for this behavior will be simply:
onKill(Player p, Entity e):
if (e.isHooked() && p.getHand(OFF_HAND).getItem() == MOB_ROD):
drop(ESSENCE)
(Though this is simplified from the actual events by quite a bit.)