Started by
CasterMx13
on
Topic category: Help with Minecraft modding (Java Edition)
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?
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.
Thanks, I managed to get it working using raytracing.
Tip: For an item trigger, use right-click (entity pos.) not right-clicked on block.
Please post your procedure. Because I was trying to do this to make a bucket procedure and have failed multiple times.
yeah would be nice :)