fix first entering teapot failure (#2259)

This commit is contained in:
pfyy 2023-07-13 10:00:55 +08:00 committed by GitHub
parent d0a4da8a1f
commit 0d71d29932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<Integer, SceneBlock> getBlocks() {