Class LevelStorage
java.lang.Object
net.minecraft.world.level.storage.LevelStorage
public class LevelStorage extends Object
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classLevelStorage.Session -
Field Summary
Fields Modifier and Type Field Description private PathbackupsDirectoryprivate com.mojang.datafixers.DataFixerdataFixerprivate static ImmutableList<String>field_25020private static LoggerLOGGERprivate PathsavesDirectoryprivate static DateTimeFormatterTIME_FORMATTER -
Constructor Summary
Constructors Constructor Description LevelStorage(Path savesDirectory, Path backupsDirectory, com.mojang.datafixers.DataFixer dataFixer) -
Method Summary
Modifier and Type Method Description static LevelStoragecreate(Path path)LevelStorage.SessioncreateSession(String directoryName)PathgetBackupsDirectory()private intgetCurrentVersion()List<LevelSummary>getLevelList()PathgetSavesDirectory()booleanisLevelNameValid(String name)booleanlevelExists(String name)private static com.mojang.datafixers.util.Pair<GeneratorOptions,com.mojang.serialization.Lifecycle>method_29010(com.mojang.serialization.Dynamic<?> dynamic, com.mojang.datafixers.DataFixer dataFixer, int int2)private BiFunction<File,com.mojang.datafixers.DataFixer,LevelSummary>method_29014(File file, boolean bool)private static DataPackSettingsmethod_29580(com.mojang.serialization.Dynamic<?> dynamic)private static DataPackSettingsmethod_29583(File file, com.mojang.datafixers.DataFixer dataFixer)private static BiFunction<File,com.mojang.datafixers.DataFixer,LevelProperties>readLevelProperties(com.mojang.serialization.DynamicOps<Tag> dynamicOps, DataPackSettings dataPackSettings)private <T> TreadLevelProperties(File file, BiFunction<File,com.mojang.datafixers.DataFixer,T> biFunction)
-
Field Details
-
LOGGER
-
TIME_FORMATTER
-
field_25020
-
savesDirectory
-
backupsDirectory
-
dataFixer
private final com.mojang.datafixers.DataFixer dataFixer
-
-
Constructor Details
-
Method Details
-
create
-
method_29010
private static com.mojang.datafixers.util.Pair<GeneratorOptions,com.mojang.serialization.Lifecycle> method_29010(com.mojang.serialization.Dynamic<?> dynamic, com.mojang.datafixers.DataFixer dataFixer, int int2) -
method_29580
-
getLevelList
-
getCurrentVersion
private int getCurrentVersion() -
readLevelProperties
@Nullable private <T> T readLevelProperties(File file, BiFunction<File,com.mojang.datafixers.DataFixer,T> biFunction) -
method_29583
@Nullable private static DataPackSettings method_29583(File file, com.mojang.datafixers.DataFixer dataFixer) -
readLevelProperties
private static BiFunction<File,com.mojang.datafixers.DataFixer,LevelProperties> readLevelProperties(com.mojang.serialization.DynamicOps<Tag> dynamicOps, DataPackSettings dataPackSettings) -
method_29014
private BiFunction<File,com.mojang.datafixers.DataFixer,LevelSummary> method_29014(File file, boolean bool) -
isLevelNameValid
-
levelExists
-
getSavesDirectory
-
getBackupsDirectory
-
createSession
- Throws:
IOException
-