Class LevelStorageSource.LevelStorageAccess
java.lang.Object
net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
LevelStorageSource
-
Field Summary
Modifier and TypeFieldDescription(package private) final LevelStorageSource.LevelDirectory
private final String
(package private) final DirectoryLock
private final Map<LevelResource,
Path> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate void
void
close()
void
com.mojang.serialization.Dynamic<?>
private com.mojang.serialization.Dynamic<?>
getDataTag
(boolean p_307503_) com.mojang.serialization.Dynamic<?>
getDimensionPath
(ResourceKey<Level> p_197395_) getFileModificationTime
(boolean p_307470_) getLevelPath
(LevelResource p_78284_) getSummary
(com.mojang.serialization.Dynamic<?> p_307314_) boolean
long
private void
modifyLevelDataWithoutDatafix
(Consumer<CompoundTag> p_307346_) parent()
void
readAdditionalLevelSaveData
(boolean fallback) void
renameAndDropPlayer
(String p_307319_) void
renameLevel
(String p_78298_) boolean
void
void
saveDataTag
(RegistryAccess p_78288_, WorldData p_78289_) void
saveDataTag
(RegistryAccess p_78291_, WorldData p_78292_, CompoundTag p_78293_) private void
saveLevelData
(CompoundTag p_307262_)
-
Field Details
-
lock
-
levelDirectory
-
levelId
-
resources
-
-
Constructor Details
-
LevelStorageAccess
LevelStorageAccess(String p_289967_, Path p_289988_) throws IOException - Throws:
IOException
-
-
Method Details
-
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 p_78291_, WorldData p_78292_, @Nullable CompoundTag p_78293_) -
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
-