Package net.minecraft.world.storage
Class SaveFormat.LevelSave
- java.lang.Object
-
- net.minecraft.world.storage.SaveFormat.LevelSave
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Enclosing class:
- SaveFormat
public class SaveFormat.LevelSave extends java.lang.Object implements java.lang.AutoCloseable
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
levelId
private java.nio.file.Path
levelPath
private SessionLockManager
lock
private java.util.Map<FolderName,java.nio.file.Path>
resources
-
Constructor Summary
Constructors Constructor Description LevelSave(java.lang.String p_i232152_2_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
checkLock()
void
close()
boolean
convertLevel(IProgressUpdate p_237283_1_)
PlayerData
createPlayerStorage()
void
deleteLevel()
DatapackCodec
getDataPacks()
IServerConfiguration
getDataTag(com.mojang.serialization.DynamicOps<INBT> p_237284_1_, DatapackCodec p_237284_2_)
java.io.File
getDimensionPath(RegistryKey<World> p_237291_1_)
java.io.File
getIconFile()
java.lang.String
getLevelId()
java.nio.file.Path
getLevelPath(FolderName p_237285_1_)
WorldSummary
getSummary()
java.nio.file.Path
getWorldDir()
long
makeWorldBackup()
void
renameLevel(java.lang.String p_237290_1_)
boolean
requiresConversion()
void
saveDataTag(DynamicRegistries p_237287_1_, IServerConfiguration p_237287_2_)
void
saveDataTag(DynamicRegistries p_237288_1_, IServerConfiguration p_237288_2_, CompoundNBT p_237288_3_)
-
-
-
Field Detail
-
lock
private final SessionLockManager lock
-
levelPath
private final java.nio.file.Path levelPath
-
levelId
private final java.lang.String levelId
-
resources
private final java.util.Map<FolderName,java.nio.file.Path> resources
-
-
Method Detail
-
getLevelId
public java.lang.String getLevelId()
-
getLevelPath
public java.nio.file.Path getLevelPath(FolderName p_237285_1_)
-
getDimensionPath
public java.io.File getDimensionPath(RegistryKey<World> p_237291_1_)
-
checkLock
private void checkLock()
-
createPlayerStorage
public PlayerData createPlayerStorage()
-
requiresConversion
public boolean requiresConversion()
-
convertLevel
public boolean convertLevel(IProgressUpdate p_237283_1_)
-
getSummary
@Nullable public WorldSummary getSummary()
-
getDataTag
@Nullable public IServerConfiguration getDataTag(com.mojang.serialization.DynamicOps<INBT> p_237284_1_, DatapackCodec p_237284_2_)
-
getDataPacks
@Nullable public DatapackCodec getDataPacks()
-
saveDataTag
public void saveDataTag(DynamicRegistries p_237287_1_, IServerConfiguration p_237287_2_)
-
saveDataTag
public void saveDataTag(DynamicRegistries p_237288_1_, IServerConfiguration p_237288_2_, @Nullable CompoundNBT p_237288_3_)
-
getIconFile
public java.io.File getIconFile()
-
getWorldDir
public java.nio.file.Path getWorldDir()
-
deleteLevel
public void deleteLevel() throws java.io.IOException
- Throws:
java.io.IOException
-
renameLevel
public void renameLevel(java.lang.String p_237290_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
makeWorldBackup
public long makeWorldBackup() throws java.io.IOException
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.io.IOException
-
-