Moving the player towards the cursor

Started by TheIncompleteNoub on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Moving the player towards the cursor

I'm on version 2024.4 for forge 1.20.1, i'm trying to make an item that launches the player in the direction they're looking. How would I go about doing this?

Thanks in advance <3

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can do this: https:/…
Mon, 06/23/2025 - 23:36

You can do this: https://imgur.com/nUlSXWp the "distance" variable doesn't represent the distance in blocks, in this example it's set to 4 but it launches the player around 10 blocks away

Joined Jul 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
bo_bo I can't seem to find…
Tue, 06/24/2025 - 01:38

bo_bo I can't seem to find the "Set number" blocks, I've tried searching for em and they don't come up.

 

Joined Apr 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you can find them in the …
Tue, 06/24/2025 - 02:27

you can find them in the "custom variables" tab, and to use them you need to first declare three number variables by pressing the green + on the right of the procedure window. Or you can simply not use them and put the values they're set to directly into the "override motion vector" block