Again, how do i make a random teleporter procedure?

Started by BlaBlaSillySheep on Fri, 05/22/2020 - 15:41

Topic category: Help with modding (Java Edition)

Last seen on 14:19, 31. May 2021
Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Again, how do i make a random teleporter procedure?
Fri, 05/22/2020 - 15:41

Like the title says, how can i achieve this?

when item used do for 0.5…
Fri, 05/22/2020 - 15:53

when item used

do for 0.5 chance

set nbt tag teleport x to: x+10*(randomNumber between 0,1)

else

set nbt tag teleport x to: x-10*(randomNumber between 0,1)

 

do for 0.5 chance

set nbt tag teleport z to: z+10*(randomNumber between 0,1)

else

set nbt tag teleport z to: z-10*(randomNumber between 0,1)

 

move player to X: nbt tag teleport x, y:y, z: nbt tag teleport z

 

#Moves player to near 10 +/- x, and near 10 +/- z, and keep y