Needing help with teleportation

Started by Sagrestogamer on Wed, 04/29/2020 - 20:51

Topic category: Advanced modding

Last seen on 21:52, 17. Nov 2020
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Needing help with teleportation
Wed, 04/29/2020 - 20:51

I was trying to make an item that make me teleport 20 blocks in front of me. I tried a lot but i could'nt do it.

Someone can help with it pls.

(sorry for the bad english)

Last seen on 21:52, 17. Nov 2020
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Like if entiditiy is looking…
Wed, 04/29/2020 - 20:56

Like if entiditiy is looking to north(other direction this is an exemple) the entiditiy teleport 20 blocks to north(other direction this is an exemple).

Last seen on 21:15, 8. Jan 2021
Joined May 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Hey, I am sure, I have an…
Fri, 05/15/2020 - 21:46

Hey, I am sure, I have an idea for you: there is this blue thing called "entity's x/y/z looking direction";

You can make brute force of testing for all the four sides where player can look and for each you can just make teleport to "current coordinates" plus 20 in the direction you want;

The four possibilities are:

x+20, z+20, x-20, z-20