Class LevelStorageSource.LevelStorageAccess

java.lang.Object
net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess
All Implemented Interfaces:
AutoCloseable
Enclosing class:
LevelStorageSource

public class LevelStorageSource.LevelStorageAccess extends Object implements AutoCloseable
  • Field Details

  • Constructor Details

  • Method Details

    • createLock

      private void createLock() throws IOException
      Throws:
      IOException
    • releaseTemporarilyAndRun

      public void releaseTemporarilyAndRun(org.apache.commons.io.function.IORunnable runnable) throws IOException
      Throws:
      IOException
    • estimateDiskSpace

      public long estimateDiskSpace()
    • checkForLowDiskSpace

      public boolean checkForLowDiskSpace()
    • safeClose

      public void safeClose()
    • parent

      public LevelStorageSource parent()
    • getLevelDirectory

      public LevelStorageSource.LevelDirectory getLevelDirectory()
    • getLevelId

      public String getLevelId()
    • getLevelPath

      public Path getLevelPath(LevelResource resource)
    • getDimensionPath

      public Path getDimensionPath(ResourceKey<Level> name)
    • checkLock

      private void checkLock()
    • readAdditionalLevelSaveData

      public void readAdditionalLevelSaveData(boolean fallback)
    • createPlayerStorage

      public PlayerDataStorage createPlayerStorage()
    • collectIssues

      public void collectIssues(boolean useFallback) throws IOException
      Throws:
      IOException
    • fixAndGetSummary

      public LevelSummary fixAndGetSummary() throws IOException
      Throws:
      IOException
    • fixAndGetSummaryFromTag

      public LevelSummary fixAndGetSummaryFromTag(com.mojang.serialization.Dynamic<?> dataTag)
    • getUnfixedDataTagWithFallback

      public com.mojang.serialization.Dynamic<?> getUnfixedDataTagWithFallback() throws IOException
      Throws:
      IOException
    • getUnfixedDataTag

      public com.mojang.serialization.Dynamic<?> getUnfixedDataTag(boolean useFallback) throws IOException
      Throws:
      IOException
    • getDataFile

      private Path getDataFile(boolean useFallback)
    • saveDataTag

      public void saveDataTag(WorldData levelData)
    • saveDataTag

      public void saveDataTag(WorldData levelData, @Nullable UUID singleplayerUUID)
    • saveLevelData

      public void saveLevelData(com.mojang.serialization.Dynamic<?> tag)
    • saveLevelData

      private void saveLevelData(CompoundTag root)
    • getIconFile

      public Optional<Path> getIconFile()
    • getWorldDir

      public Path getWorldDir()
    • deleteLevel

      public void deleteLevel() throws IOException
      Throws:
      IOException
    • renameLevel

      public void renameLevel(String newName) throws IOException
      Throws:
      IOException
    • renameAndDropPlayer

      public void renameAndDropPlayer(String newName) throws IOException
      Throws:
      IOException
    • modifyLevelDataWithoutDatafix

      private void modifyLevelDataWithoutDatafix(Consumer<CompoundTag> updater) throws IOException
      Throws:
      IOException
    • makeWorldBackup

      public long makeWorldBackup() throws IOException
      Throws:
      IOException
    • hasWorldData

      public boolean hasWorldData()
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Throws:
      IOException
    • restoreLevelDataFromOld

      public boolean restoreLevelDataFromOld()
    • getFileModificationTime

      public @Nullable Instant getFileModificationTime(boolean fallback)