Reduction of tick event lag via random number gen

Started by ivanwafles67 on Sat, 06/26/2021 - 01:49

Topic category: Help with modding (Java Edition)

Last seen on 00:19, 18. Sep 2021
Joined Jan 2021

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Reduction of tick event lag via random number gen
Sat, 06/26/2021 - 01:49

I am making a sort of territory system where people get certain anti-griefing effects upon entering an opponent's territory. However, this requires a large tick update procedure for multiple entities. To reduce the lag of this procedure, would this picture work, by which there's only a 10% chance that the procedure executes per tick, and thus would only run fully every half second? 


Or does java load the entire procedure regardless of how much of it goes through? Would this method actually reduce lag?