i need teleporting item procedure help

Started by chtrzang on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i need teleporting item procedure help

i want to create an item that teleports the player 5 blocks in the direction they're facing, but stop at a solid block if it exists (like Ender Pearls). Also add a 5-second cooldown. i have been searching guides all over the internet please help.

its something like that:…
Tue, 07/22/2025 - 08:49

its something like that:

create a producer and associate it with the right click trigger on your item

create two number variables (there value is not impotent now), name them something like targetPosX and targetPosZ

use if block to find if you will collide with solid block

the producer goes like this:

set number Global: targetPosX to x position of source entity + X value of look angle vector of source entity * 5

set number Global: targetPosZ to Z position of source entity + Z value of look angle vector of source entity * 5

set location of source entity to X: Get number Global: targetPosX Y: Y Z: Get number Global: targetPosZ