mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-12-27 11:27:39 +01:00
Print a warning instead of an error when a file can not be loaded, but can be regenerated
This commit is contained in:
parent
e78071115d
commit
5c591f591f
@ -25,6 +25,7 @@
|
||||
package de.bluecolored.bluemap.core.map;
|
||||
|
||||
import com.flowpowered.math.vector.Vector2i;
|
||||
import de.bluecolored.bluemap.core.BlueMap;
|
||||
import de.bluecolored.bluemap.core.logger.Logger;
|
||||
import de.bluecolored.bluemap.core.map.hires.HiresModel;
|
||||
import de.bluecolored.bluemap.core.map.hires.HiresModelManager;
|
||||
@ -69,7 +70,11 @@ public BmMap(String id, String name, World world, Path fileRoot, ResourcePack re
|
||||
|
||||
File rstateFile = getRenderStateFile();
|
||||
if (rstateFile.exists()) {
|
||||
this.renderState.load(rstateFile);
|
||||
try {
|
||||
this.renderState.load(rstateFile);
|
||||
} catch (IOException ex) {
|
||||
Logger.global.logWarning("Failed to load render-state for map '" + getId() + "': " + ex);
|
||||
}
|
||||
}
|
||||
|
||||
this.hiresModelManager = new HiresModelManager(
|
||||
|
@ -186,7 +186,7 @@ private LowresModel getModel(UUID world, Vector2i tile) {
|
||||
|
||||
model = new CachedModel(BufferGeometry.fromJson(json));
|
||||
} catch (IllegalArgumentException | IOException ex){
|
||||
Logger.global.logError("Failed to load lowres model: " + modelFile, ex);
|
||||
Logger.global.logWarning("Failed to load lowres model '" + modelFile + "': " + ex);
|
||||
|
||||
try {
|
||||
FileUtils.delete(modelFile);
|
||||
|
Loading…
Reference in New Issue
Block a user