Stop flickering of variables showing in GUI on tick updates

Started by FragantA4sheet on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Stop flickering of variables showing in GUI on tick updates

Hi.

I have a simple procedure as follows:

IF -> Number of items from slot 0 > 0 
Set testVariable = 5
Else if -> Number of items from slot 0 = 0
Set testVariable = 0

This is set to trigger on open GUI tick, however when displaying this on the GUI it constantly flashes between 0 and 5 instead of staying at one number. How do I fix this?