Run spotlessApply

also set line endings to native, no more line conflict errors!
This commit is contained in:
KingRainbow44
2023-05-02 14:00:00 +01:00
parent 4f1136ce2d
commit d32f6982be
1426 changed files with 1307544 additions and 1212706 deletions

View File

@@ -661,8 +661,7 @@ public class SceneScriptManager {
for (var entityId : region.getEntities()) {
var entity = this.getScene().getEntityById(entityId);
if (entity == null || !region.getMetaRegion()
.contains(entity.getPosition())) {
if (entity == null || !region.getMetaRegion().contains(entity.getPosition())) {
region.removeEntity(entityId);
}
}

View File

@@ -39,8 +39,7 @@ public class ScriptLoader {
private static Map<String, SoftReference<CompiledScript>> scriptsCache =
new ConcurrentHashMap<>();
/** sceneId - SceneMeta */
private static Map<Integer, SoftReference<SceneMeta>> sceneMetaCache =
new ConcurrentHashMap<>();
private static Map<Integer, SoftReference<SceneMeta>> sceneMetaCache = new ConcurrentHashMap<>();
public static synchronized void init() throws Exception {
if (sm != null) {

View File

@@ -93,9 +93,8 @@ public final class SceneGroup {
this.bindings = ScriptLoader.getEngine().createBindings();
CompiledScript cs =
ScriptLoader.getScript(
"Scene/" + sceneId + "/scene" + sceneId + "_group" + this.id + ".lua");
var cs =
ScriptLoader.getScript("Scene/%s/scene%s_group%s.lua".formatted(sceneId, sceneId, this.id));
if (cs == null) {
return this;
@@ -171,8 +170,10 @@ public final class SceneGroup {
.error(
"An error occurred while loading group " + this.id + " in scene " + sceneId + ".", e);
} catch (LuaError luaError) {
Grasscutter.getLogger().error("An error occurred while loading group %s in scene %s."
.formatted(this.id, sceneId), luaError);
Grasscutter.getLogger()
.error(
"An error occurred while loading group %s in scene %s.".formatted(this.id, sceneId),
luaError);
}
Grasscutter.getLogger().trace("Successfully loaded group {} in scene {}.", this.id, sceneId);