not teleporting into the ground

Started by user_25th9p7 on

Topic category: Help with modding (Java Edition)

Last seen on 01:59, 9. Nov 2021
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
not teleporting into the ground

so I made a right click ability on a sword that teleports the player 8 blocks infront of him, but it also works when they are looking down, so they will also teleport into the ground, is there a way to stop the teleport if there is a block in the way? if so, I couldnt find it 

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
by getting the block in…
Sat, 11/06/2021 - 01:07

by getting the block in front or down or up of them?

Last seen on 01:59, 9. Nov 2021
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
probably in front, but I…
Sun, 11/07/2021 - 02:37

probably in front, but I mean when the teleport is getting the player into a wall/block it should prevent it and say a  message "blocks in the way!" 

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yeah, by getting block in…
Sun, 11/07/2021 - 03:12

yeah, by getting block in front, and if its solid send message?

Last seen on 01:59, 9. Nov 2021
Joined Nov 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ye send message and cancel…
Sun, 11/07/2021 - 13:09

ye send message and cancel the teleport