Fixed crash when server initializes a new world

This commit is contained in:
Frank Bauer 2021-07-31 09:19:46 +02:00
parent 49e93e4309
commit 165c6e5b22

View file

@ -105,9 +105,9 @@ public class DataFixerAPI {
*/ */
public static boolean fixData(LevelStorageSource.LevelStorageAccess levelStorageAccess, boolean showUI, Consumer<Boolean> onResume){ public static boolean fixData(LevelStorageSource.LevelStorageAccess levelStorageAccess, boolean showUI, Consumer<Boolean> onResume){
File levelPath = levelStorageAccess.getLevelPath(LevelResource.ROOT).toFile(); File levelPath = levelStorageAccess.getLevelPath(LevelResource.ROOT).toFile();
File levelDat = levelStorageAccess.getLevelPath(LevelResource.LEVEL_DATA_FILE).toFile();
boolean newWorld = false; boolean newWorld = false;
if (!levelPath.exists()) { if (!levelDat.exists()) {
BCLib.LOGGER.info("Creating a new World, no fixes needed"); BCLib.LOGGER.info("Creating a new World, no fixes needed");
newWorld = true; newWorld = true;
} }