Trigger procedure when right click water source

Started by CasterMx13 on

Topic category: Help with modding (Java Edition)

Last seen on 05:47, 21. Feb 2024
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trigger procedure when right click water source

Having difficulties figuring out how to trigger a procedure when a water source block is right clicked. Everything I've tried either doesn't work or requires a solid block to be looked at, any tips/solutions?

Last seen on 00:55, 28. Mar 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Since water isn't a solid…
Thu, 11/03/2022 - 02:30

Since water isn't a solid block that you can click on, you'll have to use some sort of raytracing procedure. You can't detect when the player right clicks on water, but you can detect when the player right clicks, and when the player is targeting water. Alternatively, (for a simpler but slightly jankier solution), you could just check if a water source is above when a player right clicks a solid blocks, or if the player is in water when they right click.

...But if you're looking for the ability to right click a fluid block, you'll probably need to look into the 'raytrace position' blocks.

Last seen on 05:47, 21. Feb 2024
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks, I managed to get it…
Thu, 11/03/2022 - 07:16

Thanks, I managed to get it working using raytracing.
Tip: For an item trigger, use right-click (entity pos.) not right-clicked on block.

Last seen on 21:01, 27. Mar 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Please post your procedure…
Thu, 09/28/2023 - 19:03

Please post your procedure. Because I was trying to do this to make a bucket procedure and have failed multiple times.

Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah would be nice :)
Sat, 01/13/2024 - 03:18

yeah would be nice :)