[Tutorial] What block am I looking at?

Started by SpyCoder77 on

Topic category: User side tutorials

Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Tutorial] What block am I looking at?
Fri, 07/07/2023 - 19:30 (edited)

Here is a tutorial on how to detect what block a player is looking at.

Create Tag:

  • Name: Air
  • Namespace: forge
  • Tag Type: Blocks
  • Elements Under This Tag: Air, Void Air, Cave Air

Step 1. Variables:

Create Variables:

  • LookX
  • LookY
  • LookZ
  • RayDistance

All of the type "number" and player persistant

Step 2. Code Procedure:

Workspace Download

Edited by SpyCoder77 on Fri, 07/07/2023 - 19:30
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm sorry my man, but what…
Fri, 09/08/2023 - 21:59

I'm sorry my man, but what if I want the block to send a redstone signal when looked at by the player?

Joined Aug 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Loved the tutorial, helped…
Thu, 09/12/2024 - 19:09

Loved the tutorial, helped me understand these procedure blocks. Do you think it would be possible to target an entity instead of a block??? Thanks for the tutorial 😊