Find entity the player is looking at

Started by Golden64 on

Topic category: Help with modding (Java Edition)

Last seen on 03:25, 24. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Find entity the player is looking at

I want to make an item that makes it so when you right click the item it finds an entity the player is looking at and swaps places with them.

 

Last seen on 17:20, 17. Oct 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
procedure to detect when the…
Wed, 07/24/2024 - 00:13

procedure to detect when the player is looking at an entity:

https://imgur.com/qZfZp7z 

if you want to change the distance change the first 3 numbers, if you want to change the precision change the last one (too high or too low values may cause bugs, I suggest to use 5 for precision)

Last seen on 03:25, 24. Jul 2024
Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you
Wed, 07/24/2024 - 02:49

Thank you

Last seen on 17:20, 17. Oct 2024
Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You're welcome 
Wed, 07/24/2024 - 02:55

You're welcome