Started by
Solaris_21
on
Topic category: Help with Minecraft modding (Java Edition)
Trying to make a strong teleporting weapon which will teleport you to whatever block you are looking at only with one issue; you can teleport into the sky and infenitely do this, letting you fly. How can I fix this? Is there any way to add a short cooldown to the teleport? How can I make this fail if you aren't facing any blocks?
my solution to this was with a potion effect but hit me up on discord if you want em to drop a screenshot since i hate this website Von#2392
you could try making a procedure that shoots a projectile and if the projectile hits something, teleport the player to it, but if it doesn't hit something withing a set amount of time, kill the projectile.
And make that projectile invisible
Here is a tutorial I made: link