Class LevelStorage

java.lang.Object
net.minecraft.world.level.storage.LevelStorage

public class LevelStorage extends Object
Mappings:
Namespace Name
official dye
intermediary net/minecraft/class_32
named net/minecraft/world/level/storage/LevelStorage
  • Field Details

    • LOGGER

      static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a:Lorg/slf4j/Logger;
      intermediary field_17665 Lnet/minecraft/class_32;field_17665:Lorg/slf4j/Logger;
      named LOGGER Lnet/minecraft/world/level/storage/LevelStorage;LOGGER:Lorg/slf4j/Logger;
    • TIME_FORMATTER

      static final DateTimeFormatter TIME_FORMATTER
      Mappings:
      Namespace Name Mixin selector
      official b Ldye;b:Ljava/time/format/DateTimeFormatter;
      intermediary field_200 Lnet/minecraft/class_32;field_200:Ljava/time/format/DateTimeFormatter;
      named TIME_FORMATTER Lnet/minecraft/world/level/storage/LevelStorage;TIME_FORMATTER:Ljava/time/format/DateTimeFormatter;
    • GENERATOR_OPTION_KEYS

      private static final ImmutableList<String> GENERATOR_OPTION_KEYS
      Mappings:
      Namespace Name Mixin selector
      official c Ldye;c:Lcom/google/common/collect/ImmutableList;
      intermediary field_25020 Lnet/minecraft/class_32;field_25020:Lcom/google/common/collect/ImmutableList;
      named GENERATOR_OPTION_KEYS Lnet/minecraft/world/level/storage/LevelStorage;GENERATOR_OPTION_KEYS:Lcom/google/common/collect/ImmutableList;
    • DATA_KEY

      private static final String DATA_KEY
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Ldye;d:Ljava/lang/String;
      intermediary field_36348 Lnet/minecraft/class_32;field_36348:Ljava/lang/String;
      named DATA_KEY Lnet/minecraft/world/level/storage/LevelStorage;DATA_KEY:Ljava/lang/String;
    • savesDirectory

      final Path savesDirectory
      Mappings:
      Namespace Name Mixin selector
      official e Ldye;e:Ljava/nio/file/Path;
      intermediary field_17666 Lnet/minecraft/class_32;field_17666:Ljava/nio/file/Path;
      named savesDirectory Lnet/minecraft/world/level/storage/LevelStorage;savesDirectory:Ljava/nio/file/Path;
    • backupsDirectory

      private final Path backupsDirectory
      Mappings:
      Namespace Name Mixin selector
      official f Ldye;f:Ljava/nio/file/Path;
      intermediary field_17667 Lnet/minecraft/class_32;field_17667:Ljava/nio/file/Path;
      named backupsDirectory Lnet/minecraft/world/level/storage/LevelStorage;backupsDirectory:Ljava/nio/file/Path;
    • dataFixer

      final com.mojang.datafixers.DataFixer dataFixer
      Mappings:
      Namespace Name Mixin selector
      official g Ldye;g:Lcom/mojang/datafixers/DataFixer;
      intermediary field_17668 Lnet/minecraft/class_32;field_17668:Lcom/mojang/datafixers/DataFixer;
      named dataFixer Lnet/minecraft/world/level/storage/LevelStorage;dataFixer:Lcom/mojang/datafixers/DataFixer;
  • Constructor Details

    • LevelStorage

      public LevelStorage(Path savesDirectory, Path backupsDirectory, com.mojang.datafixers.DataFixer dataFixer)
      Mappings:
      Namespace Name Mixin selector
      official <init> Ldye;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Lcom/mojang/datafixers/DataFixer;)V
      intermediary <init> Lnet/minecraft/class_32;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Lcom/mojang/datafixers/DataFixer;)V
      named <init> Lnet/minecraft/world/level/storage/LevelStorage;<init>(Ljava/nio/file/Path;Ljava/nio/file/Path;Lcom/mojang/datafixers/DataFixer;)V
  • Method Details

    • create

      public static LevelStorage create(Path path)
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a(Ljava/nio/file/Path;)Ldye;
      intermediary method_26999 Lnet/minecraft/class_32;method_26999(Ljava/nio/file/Path;)Lnet/minecraft/class_32;
      named create Lnet/minecraft/world/level/storage/LevelStorage;create(Ljava/nio/file/Path;)Lnet/minecraft/world/level/storage/LevelStorage;
    • readGeneratorProperties

      private static <T> com.mojang.serialization.DataResult<WorldGenSettings> readGeneratorProperties(com.mojang.serialization.Dynamic<T> levelData, com.mojang.datafixers.DataFixer dataFixer, int version)
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a(Lcom/mojang/serialization/Dynamic;Lcom/mojang/datafixers/DataFixer;I)Lcom/mojang/serialization/DataResult;
      intermediary method_29010 Lnet/minecraft/class_32;method_29010(Lcom/mojang/serialization/Dynamic;Lcom/mojang/datafixers/DataFixer;I)Lcom/mojang/serialization/DataResult;
      named readGeneratorProperties Lnet/minecraft/world/level/storage/LevelStorage;readGeneratorProperties(Lcom/mojang/serialization/Dynamic;Lcom/mojang/datafixers/DataFixer;I)Lcom/mojang/serialization/DataResult;
    • parseDataPackSettings

      private static DataConfiguration parseDataPackSettings(com.mojang.serialization.Dynamic<?> dynamic)
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a(Lcom/mojang/serialization/Dynamic;)Lcna;
      intermediary method_29580 Lnet/minecraft/class_32;method_29580(Lcom/mojang/serialization/Dynamic;)Lnet/minecraft/class_7712;
      named parseDataPackSettings Lnet/minecraft/world/level/storage/LevelStorage;parseDataPackSettings(Lcom/mojang/serialization/Dynamic;)Lnet/minecraft/resource/DataConfiguration;
    • getFormatName

      public String getFormatName()
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a()Ljava/lang/String;
      intermediary method_35504 Lnet/minecraft/class_32;method_35504()Ljava/lang/String;
      named getFormatName Lnet/minecraft/world/level/storage/LevelStorage;getFormatName()Ljava/lang/String;
    • getLevelList

      public LevelStorage.LevelList getLevelList() throws LevelStorageException
      Throws:
      LevelStorageException
      Mappings:
      Namespace Name Mixin selector
      official b Ldye;b()Ldye$a;
      intermediary method_235 Lnet/minecraft/class_32;method_235()Lnet/minecraft/class_32$class_7410;
      named getLevelList Lnet/minecraft/world/level/storage/LevelStorage;getLevelList()Lnet/minecraft/world/level/storage/LevelStorage$LevelList;
    • loadSummaries

      public CompletableFuture<List<LevelSummary>> loadSummaries(LevelStorage.LevelList levels)
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a(Ldye$a;)Ljava/util/concurrent/CompletableFuture;
      intermediary method_43417 Lnet/minecraft/class_32;method_43417(Lnet/minecraft/class_32$class_7410;)Ljava/util/concurrent/CompletableFuture;
      named loadSummaries Lnet/minecraft/world/level/storage/LevelStorage;loadSummaries(Lnet/minecraft/world/level/storage/LevelStorage$LevelList;)Ljava/util/concurrent/CompletableFuture;
    • getCurrentVersion

      private int getCurrentVersion()
      Mappings:
      Namespace Name Mixin selector
      official e Ldye;e()I
      intermediary method_17931 Lnet/minecraft/class_32;method_17931()I
      named getCurrentVersion Lnet/minecraft/world/level/storage/LevelStorage;getCurrentVersion()I
    • readLevelProperties

      @Nullable <T> T readLevelProperties(LevelStorage.LevelSave levelSave, BiFunction<Path,com.mojang.datafixers.DataFixer,T> levelDataParser)
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a(Ldye$b;Ljava/util/function/BiFunction;)Ljava/lang/Object;
      intermediary method_26998 Lnet/minecraft/class_32;method_26998(Lnet/minecraft/class_32$class_7411;Ljava/util/function/BiFunction;)Ljava/lang/Object;
      named readLevelProperties Lnet/minecraft/world/level/storage/LevelStorage;readLevelProperties(Lnet/minecraft/world/level/storage/LevelStorage$LevelSave;Ljava/util/function/BiFunction;)Ljava/lang/Object;
    • readDataPackSettings

      @Nullable private static @Nullable DataConfiguration readDataPackSettings(Path path, com.mojang.datafixers.DataFixer dataFixer)
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a(Ljava/nio/file/Path;Lcom/mojang/datafixers/DataFixer;)Lcna;
      intermediary method_29583 Lnet/minecraft/class_32;method_29583(Ljava/nio/file/Path;Lcom/mojang/datafixers/DataFixer;)Lnet/minecraft/class_7712;
      named readDataPackSettings Lnet/minecraft/world/level/storage/LevelStorage;readDataPackSettings(Ljava/nio/file/Path;Lcom/mojang/datafixers/DataFixer;)Lnet/minecraft/resource/DataConfiguration;
    • createLevelDataParser

      static BiFunction<Path,com.mojang.datafixers.DataFixer,com.mojang.datafixers.util.Pair<SaveProperties,DimensionOptionsRegistryHolder.DimensionsConfig>> createLevelDataParser(com.mojang.serialization.DynamicOps<NbtElement> ops, DataConfiguration dataConfiguration, Registry<DimensionOptions> dimensionOptionsRegistry, com.mojang.serialization.Lifecycle lifecycle)
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a(Lcom/mojang/serialization/DynamicOps;Lcna;Lhq;Lcom/mojang/serialization/Lifecycle;)Ljava/util/function/BiFunction;
      intermediary method_17926 Lnet/minecraft/class_32;method_17926(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/class_7712;Lnet/minecraft/class_2378;Lcom/mojang/serialization/Lifecycle;)Ljava/util/function/BiFunction;
      named createLevelDataParser Lnet/minecraft/world/level/storage/LevelStorage;createLevelDataParser(Lcom/mojang/serialization/DynamicOps;Lnet/minecraft/resource/DataConfiguration;Lnet/minecraft/registry/Registry;Lcom/mojang/serialization/Lifecycle;)Ljava/util/function/BiFunction;
    • createLevelDataParser

      BiFunction<Path,com.mojang.datafixers.DataFixer,LevelSummary> createLevelDataParser(LevelStorage.LevelSave levelSave, boolean locked)
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a(Ldye$b;Z)Ljava/util/function/BiFunction;
      intermediary method_29014 Lnet/minecraft/class_32;method_29014(Lnet/minecraft/class_32$class_7411;Z)Ljava/util/function/BiFunction;
      named createLevelDataParser Lnet/minecraft/world/level/storage/LevelStorage;createLevelDataParser(Lnet/minecraft/world/level/storage/LevelStorage$LevelSave;Z)Ljava/util/function/BiFunction;
    • parseEnabledFeatures

      private static FeatureSet parseEnabledFeatures(com.mojang.serialization.Dynamic<?> levelData)
      Mappings:
      Namespace Name Mixin selector
      official b Ldye;b(Lcom/mojang/serialization/Dynamic;)Lcau;
      intermediary method_45552 Lnet/minecraft/class_32;method_45552(Lcom/mojang/serialization/Dynamic;)Lnet/minecraft/class_7699;
      named parseEnabledFeatures Lnet/minecraft/world/level/storage/LevelStorage;parseEnabledFeatures(Lcom/mojang/serialization/Dynamic;)Lnet/minecraft/resource/featuretoggle/FeatureSet;
    • loadCompactLevelData

      @Nullable private static @Nullable NbtElement loadCompactLevelData(Path path) throws IOException
      Returns the compact version of the NBT for the level data file.

      The returned NBT will not have Player and WorldGenSettings keys.

      Returns:
      the compact version of the NBT for the level data file
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official b Ldye;b(Ljava/nio/file/Path;)Lrx;
      intermediary method_40035 Lnet/minecraft/class_32;method_40035(Ljava/nio/file/Path;)Lnet/minecraft/class_2520;
      named loadCompactLevelData Lnet/minecraft/world/level/storage/LevelStorage;loadCompactLevelData(Ljava/nio/file/Path;)Lnet/minecraft/nbt/NbtElement;
    • isLevelNameValid

      public boolean isLevelNameValid(String name)
      Mappings:
      Namespace Name Mixin selector
      official a Ldye;a(Ljava/lang/String;)Z
      intermediary method_240 Lnet/minecraft/class_32;method_240(Ljava/lang/String;)Z
      named isLevelNameValid Lnet/minecraft/world/level/storage/LevelStorage;isLevelNameValid(Ljava/lang/String;)Z
    • levelExists

      public boolean levelExists(String name)
      Mappings:
      Namespace Name Mixin selector
      official b Ldye;b(Ljava/lang/String;)Z
      intermediary method_230 Lnet/minecraft/class_32;method_230(Ljava/lang/String;)Z
      named levelExists Lnet/minecraft/world/level/storage/LevelStorage;levelExists(Ljava/lang/String;)Z
    • getSavesDirectory

      public Path getSavesDirectory()
      Mappings:
      Namespace Name Mixin selector
      official c Ldye;c()Ljava/nio/file/Path;
      intermediary method_19636 Lnet/minecraft/class_32;method_19636()Ljava/nio/file/Path;
      named getSavesDirectory Lnet/minecraft/world/level/storage/LevelStorage;getSavesDirectory()Ljava/nio/file/Path;
    • getBackupsDirectory

      public Path getBackupsDirectory()
      Mappings:
      Namespace Name Mixin selector
      official d Ldye;d()Ljava/nio/file/Path;
      intermediary method_236 Lnet/minecraft/class_32;method_236()Ljava/nio/file/Path;
      named getBackupsDirectory Lnet/minecraft/world/level/storage/LevelStorage;getBackupsDirectory()Ljava/nio/file/Path;
    • createSession

      public LevelStorage.Session createSession(String directoryName) throws IOException
      Throws:
      IOException
      Mappings:
      Namespace Name Mixin selector
      official c Ldye;c(Ljava/lang/String;)Ldye$c;
      intermediary method_27002 Lnet/minecraft/class_32;method_27002(Ljava/lang/String;)Lnet/minecraft/class_32$class_5143;
      named createSession Lnet/minecraft/world/level/storage/LevelStorage;createSession(Ljava/lang/String;)Lnet/minecraft/world/level/storage/LevelStorage$Session;