public class SaveHandler extends java.lang.Object implements ISaveHandler, IPlayerFileData
Modifier and Type | Field and Description |
---|---|
protected DataFixer |
dataFixer |
private long |
initializationTime |
private static org.apache.logging.log4j.Logger |
LOGGER |
private java.io.File |
mapDataDir |
private java.io.File |
playersDirectory |
private java.lang.String |
saveDirectoryName |
private TemplateManager |
structureTemplateManager |
private java.io.File |
worldDirectory |
Constructor and Description |
---|
SaveHandler(java.io.File p_i46648_1_,
java.lang.String saveDirectoryNameIn,
boolean p_i46648_3_,
DataFixer dataFixerIn) |
Modifier and Type | Method and Description |
---|---|
void |
checkSessionLock() |
void |
flush() |
java.lang.String[] |
getAvailablePlayerDat() |
IChunkLoader |
getChunkLoader(WorldProvider provider) |
java.io.File |
getMapFileFromName(java.lang.String mapName) |
NBTTagCompound |
getPlayerNBT(EntityPlayerMP player) |
IPlayerFileData |
getPlayerNBTManager() |
TemplateManager |
getStructureTemplateManager() |
java.io.File |
getWorldDirectory() |
WorldInfo |
loadWorldInfo() |
NBTTagCompound |
readPlayerData(EntityPlayer player) |
void |
saveWorldInfo(WorldInfo worldInformation) |
void |
saveWorldInfoWithPlayer(WorldInfo worldInformation,
NBTTagCompound tagCompound) |
private void |
setSessionLock() |
void |
writePlayerData(EntityPlayer player) |
private static final org.apache.logging.log4j.Logger LOGGER
private final java.io.File worldDirectory
private final java.io.File playersDirectory
private final java.io.File mapDataDir
private final long initializationTime
private final java.lang.String saveDirectoryName
private final TemplateManager structureTemplateManager
protected final DataFixer dataFixer
public SaveHandler(java.io.File p_i46648_1_, java.lang.String saveDirectoryNameIn, boolean p_i46648_3_, DataFixer dataFixerIn)
private void setSessionLock()
public java.io.File getWorldDirectory()
getWorldDirectory
in interface ISaveHandler
public void checkSessionLock() throws MinecraftException
checkSessionLock
in interface ISaveHandler
MinecraftException
public IChunkLoader getChunkLoader(WorldProvider provider)
getChunkLoader
in interface ISaveHandler
@Nullable public WorldInfo loadWorldInfo()
loadWorldInfo
in interface ISaveHandler
public void saveWorldInfoWithPlayer(WorldInfo worldInformation, @Nullable NBTTagCompound tagCompound)
saveWorldInfoWithPlayer
in interface ISaveHandler
public void saveWorldInfo(WorldInfo worldInformation)
saveWorldInfo
in interface ISaveHandler
public void writePlayerData(EntityPlayer player)
writePlayerData
in interface IPlayerFileData
@Nullable public NBTTagCompound readPlayerData(EntityPlayer player)
readPlayerData
in interface IPlayerFileData
public IPlayerFileData getPlayerNBTManager()
getPlayerNBTManager
in interface ISaveHandler
public java.lang.String[] getAvailablePlayerDat()
getAvailablePlayerDat
in interface IPlayerFileData
public void flush()
flush
in interface ISaveHandler
public java.io.File getMapFileFromName(java.lang.String mapName)
getMapFileFromName
in interface ISaveHandler
public TemplateManager getStructureTemplateManager()
getStructureTemplateManager
in interface ISaveHandler
public NBTTagCompound getPlayerNBT(EntityPlayerMP player)