Placed blocks 'flickering' when involved with the 'random' function

Started by SnailsAttack on

Topic category: Troubleshooting, bugs, and solutions

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Placed blocks 'flickering' when involved with the 'random' function

When blocks are placed via a procedure, with positions that are determined using any of MCreator's 'random' functions, the game is briefly indecisive about the computed positions. This can be seen in the following video where the lily pads generated by my procedure appear to briefly flicker into existence before assuming their true positions.

https://www.youtube.com/watch?v=4D7ulAobMrw

It's almost as if the game is running the calculations twice, once on the server and once on the client (even though I'm running a singleplayer world), and only synchronizing properly after a brief moment.

The relevant code block looks like this:

This bug is visually quite annoying in some situations. Any way to get it to behave properly?

 

Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Figured it out, you just…
Sat, 11/18/2023 - 07:28

Figured it out, you just have to use the 'do X in server-side world Y' block. It doesn't have the same local variable restrictions as the 'wait' block.