Help with Hose Reel effect

Started by Hex6168 on Wed, 07/29/2020 - 18:29

Topic category: Help with modding (Java Edition)

Last seen on 19:04, 4. Aug 2020
Joined Jul 2020

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with Hose Reel effect
Wed, 07/29/2020 - 18:29

Hi, I'm trying to make a hose reel, that when you right click it, creates a line between the reel and the player similar to a leash or fishing line, as well as auto-equip an item in the player's hand that shoots water. Most of this I have been able to figure out, but the line of hose I need to exist between the hose reel block and the player, I haven't been able to figure out.

I'm wanting to approach it one of two ways; either a sort of nozzle either that hooks to the hose reel like a leash and allows the nozzle to thus shoot water, or a right click on the reel block that draws the hose line and auto-equips the nozzle item/weapon.

So, from looking at the first option, I think it'd be a right-click usage procedure on the nozzle that checks for the reel block as the target. The missing knowledge would be how to then draw the hose line connecting the block and player, as well as how to automatically disconnect the hose line at a certain distance (say 20 meters).

The 2nd approach would be a onrightclick procedure of the hose reel that would then automatically create, equip, and connect the nozzle. Missing knowledge here is again how to draw the hose line, but also how to auto-equip a created item within a procedure.

My java skills are weak, but I'm an experienced coder with other languages. If you have ideas how I might be able to do this through procedures, please share. If it would require java, please share in a manner that would let me know where I would need to implement custom code because an answer like, "requires custom code" with no further information would be useless to me.

Thanks for taking the time to read!