[Suggestion] Lag Tester
Kallefinn opened this issue ยท 5 comments
Im not sure if there is already a practical way of testing contraptions under laggy conditions but it would be helpful to be able to perform a tick warp under extreme conditions to make sure it is lag proof. So i would propose the addition of a tick warp with lag spikes to test for extreme casses. If there already is a way or if it isnt possible please let me know.
Almost sure that Thread.sleep(5000)
would make any system generate a lag spike.
But of course generating a lag spike under a tick warp would basically slow down the ticks, so it wouldn't be a tick warp anymore.
It would be about finding what does the game consider a "lag spike" and force that state instead in order to keep the game fast.
Maybe instead of a specific "sub" tick warp, a command to produce that state in any moment and in a tick warp it could be used by setting a command block to trigger it in a clock.
Actually, the 1.12 version of Carpet uses exactly that at LagSpikeHelper.java#L28, but once again that does literally lag the game for that time, making the tick warp ticks really slow.