events handling is disabled now when potentially triggered from the scarpet script preventing from recursive callbacks.

This commit is contained in:
gnembon committed 2021-09-06 02:37:08 -03:00
1 parent 8325783bf4
commit 229d0b037b
5 files changed
+104 -32

No files matched your search

@@ -375,7 +375,7 @@ public class CarpetScriptServer
{
CarpetProfiler.ProfilerToken token;
token = CarpetProfiler.start_section(null, "Scarpet schedule", CarpetProfiler.TYPE.GENERAL);
events.tick();
events.handleEvents.getWhileDisabled( () -> {events.tick(); return null;});
CarpetProfiler.end_current_section(token);
token = CarpetProfiler.start_section(null, "Scarpet app data", CarpetProfiler.TYPE.GENERAL);
for (CarpetScriptHost host : modules.values())