Class LevelStorageSource
java.lang.Object
net.minecraft.world.level.storage.LevelStorageSource
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
static final record
class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
private final Path
private final Path
(package private) final com.mojang.datafixers.DataFixer
(package private) static final DateTimeFormatter
(package private) static final org.slf4j.Logger
private static final PathAllowList
private static final com.google.common.collect.ImmutableList<String>
private static final String
private final DirectoryValidator
-
Constructor Summary
ConstructorDescriptionLevelStorageSource
(Path p_289985_, Path p_289978_, DirectoryValidator p_289922_, com.mojang.datafixers.DataFixer p_289940_) -
Method Summary
Modifier and TypeMethodDescriptioncreateAccess
(String p_78261_) static LevelStorageSource
createDefault
(Path p_78243_) private static WorldDataConfiguration
getDataConfiguration
(Path p_230829_, com.mojang.datafixers.DataFixer p_230830_) (package private) static BiFunction<Path,
com.mojang.datafixers.DataFixer, com.mojang.datafixers.util.Pair<WorldData, WorldDimensions.Complete>> getLevelData
(com.mojang.serialization.DynamicOps<Tag> p_250592_, WorldDataConfiguration p_249054_, Registry<LevelStem> p_249363_, com.mojang.serialization.Lifecycle p_251214_) private Path
getLevelPath
(String p_289974_) getName()
private int
boolean
isNewLevelIdAcceptable
(String p_78241_) boolean
levelExists
(String p_78256_) (package private) BiFunction<Path,
com.mojang.datafixers.DataFixer, LevelSummary> levelSummaryReader
(LevelStorageSource.LevelDirectory p_230821_, boolean p_230822_) private static FeatureFlagSet
parseFeatureFlagsFromSummary
(com.mojang.serialization.Dynamic<?> p_249466_) static DirectoryValidator
parseValidator
(Path p_289968_) private static WorldDataConfiguration
readDataConfig
(com.mojang.serialization.Dynamic<?> p_250884_) (package private) <T> T
readLevelData
(LevelStorageSource.LevelDirectory p_230818_, BiFunction<Path, com.mojang.datafixers.DataFixer, T> p_230819_) private static Tag
readLightweightData
(Path p_230837_) private static <T> com.mojang.serialization.DataResult<WorldGenSettings>
readWorldGenSettings
(com.mojang.serialization.Dynamic<T> p_251661_, com.mojang.datafixers.DataFixer p_251712_, int p_250368_) validateAndCreateAccess
(String p_289980_)
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
FORMATTER
-
OLD_SETTINGS_KEYS
-
TAG_DATA
- See Also:
-
NO_SYMLINKS_ALLOWED
-
ALLOWED_SYMLINKS_CONFIG_NAME
- See Also:
-
baseDir
-
backupDir
-
fixerUpper
final com.mojang.datafixers.DataFixer fixerUpper -
worldDirValidator
-
-
Constructor Details
-
LevelStorageSource
public LevelStorageSource(Path p_289985_, Path p_289978_, DirectoryValidator p_289922_, com.mojang.datafixers.DataFixer p_289940_)
-
-
Method Details
-
parseValidator
-
createDefault
-
readWorldGenSettings
private static <T> com.mojang.serialization.DataResult<WorldGenSettings> readWorldGenSettings(com.mojang.serialization.Dynamic<T> p_251661_, com.mojang.datafixers.DataFixer p_251712_, int p_250368_) -
readDataConfig
-
getName
-
findLevelCandidates
- Throws:
LevelStorageException
-
loadLevelSummaries
public CompletableFuture<List<LevelSummary>> loadLevelSummaries(LevelStorageSource.LevelCandidates p_230814_) -
getStorageVersion
private int getStorageVersion() -
readLevelData
@Nullable <T> T readLevelData(LevelStorageSource.LevelDirectory p_230818_, BiFunction<Path, com.mojang.datafixers.DataFixer, T> p_230819_) -
getDataConfiguration
@Nullable private static WorldDataConfiguration getDataConfiguration(Path p_230829_, com.mojang.datafixers.DataFixer p_230830_) -
getLevelData
static BiFunction<Path,com.mojang.datafixers.DataFixer, getLevelDatacom.mojang.datafixers.util.Pair<WorldData, WorldDimensions.Complete>> (com.mojang.serialization.DynamicOps<Tag> p_250592_, WorldDataConfiguration p_249054_, Registry<LevelStem> p_249363_, com.mojang.serialization.Lifecycle p_251214_) -
levelSummaryReader
BiFunction<Path,com.mojang.datafixers.DataFixer, levelSummaryReaderLevelSummary> (LevelStorageSource.LevelDirectory p_230821_, boolean p_230822_) -
parseFeatureFlagsFromSummary
private static FeatureFlagSet parseFeatureFlagsFromSummary(com.mojang.serialization.Dynamic<?> p_249466_) -
readLightweightData
- Throws:
IOException
-
isNewLevelIdAcceptable
-
levelExists
-
getLevelPath
-
getBaseDir
-
getBackupPath
-
validateAndCreateAccess
public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(String p_289980_) throws IOException, ContentValidationException -
createAccess
- Throws:
IOException
-
getWorldDirValidator
-