Class SaveFormat


  • public class SaveFormat
    extends java.lang.Object
    • Field Detail

      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • FORMATTER

        private static final java.time.format.DateTimeFormatter FORMATTER
      • OLD_SETTINGS_KEYS

        private static final com.google.common.collect.ImmutableList<java.lang.String> OLD_SETTINGS_KEYS
      • baseDir

        private final java.nio.file.Path baseDir
      • backupDir

        private final java.nio.file.Path backupDir
      • fixerUpper

        private final com.mojang.datafixers.DataFixer fixerUpper
    • Constructor Detail

      • SaveFormat

        public SaveFormat​(java.nio.file.Path p_i51277_1_,
                          java.nio.file.Path p_i51277_2_,
                          com.mojang.datafixers.DataFixer p_i51277_3_)
    • Method Detail

      • createDefault

        public static SaveFormat createDefault​(java.nio.file.Path p_237269_0_)
      • readWorldGenSettings

        private static <T> com.mojang.datafixers.util.Pair<DimensionGeneratorSettings,​com.mojang.serialization.Lifecycle> readWorldGenSettings​(com.mojang.serialization.Dynamic<T> p_237259_0_,
                                                                                                                                                     com.mojang.datafixers.DataFixer p_237259_1_,
                                                                                                                                                     int p_237259_2_)
      • readDataPackConfig

        private static DatapackCodec readDataPackConfig​(com.mojang.serialization.Dynamic<?> p_237258_0_)
      • getStorageVersion

        private int getStorageVersion()
      • readLevelData

        @Nullable
        private <T> T readLevelData​(java.io.File p_237266_1_,
                                    java.util.function.BiFunction<java.io.File,​com.mojang.datafixers.DataFixer,​T> p_237266_2_)
      • getDataPacks

        @Nullable
        private static DatapackCodec getDataPacks​(java.io.File p_237272_0_,
                                                  com.mojang.datafixers.DataFixer p_237272_1_)
      • getLevelData

        private static java.util.function.BiFunction<java.io.File,​com.mojang.datafixers.DataFixer,​ServerWorldInfo> getLevelData​(com.mojang.serialization.DynamicOps<INBT> p_237270_0_,
                                                                                                                                            DatapackCodec p_237270_1_)
      • getReader

        private static java.util.function.BiFunction<java.io.File,​com.mojang.datafixers.DataFixer,​ServerWorldInfo> getReader​(com.mojang.serialization.DynamicOps<INBT> p_237270_0_,
                                                                                                                                         DatapackCodec p_237270_1_,
                                                                                                                                         @Nullable
                                                                                                                                         SaveFormat.LevelSave levelSave)
      • levelSummaryReader

        private java.util.function.BiFunction<java.io.File,​com.mojang.datafixers.DataFixer,​WorldSummary> levelSummaryReader​(java.io.File p_237267_1_,
                                                                                                                                        boolean p_237267_2_)
      • isNewLevelIdAcceptable

        public boolean isNewLevelIdAcceptable​(java.lang.String p_207742_1_)
      • levelExists

        public boolean levelExists​(java.lang.String p_90033_1_)
      • getBaseDir

        public java.nio.file.Path getBaseDir()
      • getBackupPath

        public java.nio.file.Path getBackupPath()
      • createAccess

        public SaveFormat.LevelSave createAccess​(java.lang.String p_237274_1_)
                                          throws java.io.IOException
        Throws:
        java.io.IOException