Class LevelStorage.Session
java.lang.Object
net.minecraft.world.level.storage.LevelStorage.Session
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
- LevelStorage
public class LevelStorage.Session extends Object implements AutoCloseable
-
Field Summary
Fields Modifier and Type Field Description private Path
directory
private String
directoryName
private SessionLock
lock
private Map<WorldSavePath,Path>
paths
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description void
backupLevelDataFile(DynamicRegistryManager dynamicRegistryManager, SaveProperties saveProperties)
void
backupLevelDataFile(DynamicRegistryManager dynamicRegistryManager, SaveProperties saveProperties, CompoundTag compoundTag)
private void
checkValid()
void
close()
boolean
convert(ProgressListener progressListener)
long
createBackup()
WorldSaveHandler
createSaveHandler()
void
deleteSessionLock()
DataPackSettings
getDataPackSettings()
Path
getDirectory(WorldSavePath savePath)
String
getDirectoryName()
File
getIconFile()
LevelSummary
getLevelSummary()
File
getWorldDirectory(RegistryKey<World> key)
boolean
needsConversion()
SaveProperties
readLevelProperties(com.mojang.serialization.DynamicOps<Tag> dynamicOps, DataPackSettings dataPackSettings)
void
save(String name)
-
Field Details
-
lock
-
directory
-
directoryName
-
paths
-
-
Constructor Details
-
Session
- Throws:
IOException
-
-
Method Details
-
getDirectoryName
-
getDirectory
-
getWorldDirectory
-
checkValid
private void checkValid() -
createSaveHandler
-
needsConversion
public boolean needsConversion() -
convert
-
getLevelSummary
-
readLevelProperties
@Nullable public SaveProperties readLevelProperties(com.mojang.serialization.DynamicOps<Tag> dynamicOps, DataPackSettings dataPackSettings) -
getDataPackSettings
-
backupLevelDataFile
public void backupLevelDataFile(DynamicRegistryManager dynamicRegistryManager, SaveProperties saveProperties) -
backupLevelDataFile
public void backupLevelDataFile(DynamicRegistryManager dynamicRegistryManager, SaveProperties saveProperties, @Nullable CompoundTag compoundTag) -
getIconFile
-
deleteSessionLock
- Throws:
IOException
-
save
- Throws:
IOException
-
createBackup
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-