Probability to exit specific dimension every tick

Started by Greo on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Probability to exit specific dimension every tick

I want to make a dimension in which you have a 0.0025% probability per tick to randomly exit the dimension and teleport to the overworld. How to do it? Is there a way? I know how to make probabilitys but I dont know how to do per tick and haw to detect a player beeing inside a dimension. Pls help.

Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I think there is a block for…
Wed, 02/21/2024 - 21:33

I think there is a block for "dimension of <event/target entity>". Create a procedure, then change "no additional trigger" to "player tick update". Then, add an if statement to check if the player is in your dimension. Then, add a second if statement that checks if "( Random [0, 1) ) < (0.000025)". Then, you can add a block to move the player to the overworld.

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks! It worked.  
Fri, 02/23/2024 - 23:11

Thanks! It worked.

 

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I really could habe got this…
Fri, 02/23/2024 - 23:11

I really could habe got this myself :,)