Class LevelStorageSource.LevelStorageAccess
java.lang.Object
net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
LevelStorageSource
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final LevelStorageSource.LevelDirectory
private final String
(package private) final DirectoryLock
private final Map
<LevelResource, Path> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
private void
void
close()
void
long
com.mojang.serialization.Dynamic
<?> private com.mojang.serialization.Dynamic
<?> getDataTag
(boolean useFallback) com.mojang.serialization.Dynamic
<?> getDimensionPath
(ResourceKey<Level> dimensionPath) getFileModificationTime
(boolean useFallback) getLevelPath
(LevelResource folderName) getSummary
(com.mojang.serialization.Dynamic<?> dynamic) boolean
long
private void
modifyLevelDataWithoutDatafix
(Consumer<CompoundTag> modifier) parent()
void
readAdditionalLevelSaveData
(boolean fallback) void
renameAndDropPlayer
(String saveName) void
renameLevel
(String saveName) boolean
void
void
saveDataTag
(RegistryAccess registries, WorldData serverConfiguration) void
saveDataTag
(RegistryAccess registries, WorldData serverConfiguration, CompoundTag hostPlayerNBT) private void
saveLevelData
(CompoundTag tag)
-
Field Details
-
lock
-
levelDirectory
-
levelId
-
resources
-
-
Constructor Details
-
LevelStorageAccess
LevelStorageAccess(String levelId, Path levelDir) throws IOException - Throws:
IOException
-
-
Method Details
-
estimateDiskSpace
public long estimateDiskSpace() -
checkForLowDiskSpace
public boolean checkForLowDiskSpace() -
safeClose
public void safeClose() -
parent
-
getLevelDirectory
-
getLevelId
-
getLevelPath
-
getDimensionPath
-
checkLock
private void checkLock() -
readAdditionalLevelSaveData
public void readAdditionalLevelSaveData(boolean fallback) -
createPlayerStorage
-
getSummary
-
getDataTag
- Throws:
IOException
-
getDataTagFallback
- Throws:
IOException
-
getDataTag
- Throws:
IOException
-
saveDataTag
-
saveDataTag
public void saveDataTag(RegistryAccess registries, WorldData serverConfiguration, @Nullable CompoundTag hostPlayerNBT) -
saveLevelData
-
getIconFile
-
getWorldDir
-
deleteLevel
- Throws:
IOException
-
renameLevel
- Throws:
IOException
-
renameAndDropPlayer
- Throws:
IOException
-
modifyLevelDataWithoutDatafix
- Throws:
IOException
-
makeWorldBackup
- Throws:
IOException
-
hasWorldData
public boolean hasWorldData() -
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
restoreLevelDataFromOld
public boolean restoreLevelDataFromOld() -
getFileModificationTime
-