How do I get the x, y, and z coordinates of the block that the player is looking at in the function?

Started by User -37 -NA- on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I get the x, y, and z coordinates of the block that the player is looking at in the function?

I was trying to make it so that when you click on a block with a certain object, particles appear on the block, and not where the player clicked, but in the middle of the block. But I couldn't find the data that can be used to determine the coordinates of the block. Can you help me?