From 0d71d2993235d051e3701ed93a3dc0d1e70ac2ad Mon Sep 17 00:00:00 2001 From: pfyy <112098515+pfyy@users.noreply.github.com> Date: Thu, 13 Jul 2023 10:00:55 +0800 Subject: [PATCH] fix first entering teapot failure (#2259) --- .../java/emu/grasscutter/scripts/SceneScriptManager.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java b/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java index bf459cb4d..3a3c88bec 100644 --- a/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java +++ b/src/main/java/emu/grasscutter/scripts/SceneScriptManager.java @@ -99,7 +99,13 @@ public class SceneScriptManager { } public SceneConfig getConfig() { - return this.isInit ? this.meta.config : null; + for (int i = 0; i < 10; ++i) { + if (this.isInit) { + return this.meta.config; + } + Utils.sleep(100); + } + return null; } public Map getBlocks() {