Topic category: Help with modding (Java Edition)
I have an idea of making and Ender Sword. I want it to randomly teleport player who is using it to its target.
I have a variable called "Teleport", it's type is number. My procedure looks like this:
Set Local: Teleport to: Random [0,1)
if Get Local: Teleport = 0
do Set location of Source entity to x: x y: y z: z
It works, but the sword teleports all the time. I have no idea how to make the sword teleporting ramdomly. Can somebody help me?