Portion of code only works part of the time

Started by sc3d on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Aug 2024
Points:
89

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 0
Portion of code only works part of the time
Sat, 08/17/2024 - 23:42 (edited)

This is the code I need help with. It is activated via a block break.

The code of the program

The random function and sound always work. The teleporting mechanism, however, only works about 40% of the time. It is not because I am being teleported to the same place; you can tell when that happens. I have tried:
 

  • Using a random double instead of int
  • Setting a higher minimum Y position

Please let me know if you have a solution. Thank you!

Edited by sc3d on Sat, 08/17/2024 - 23:42