类 LevelStorageSource
java.lang.Object
net.minecraft.world.level.storage.LevelStorageSource
-
嵌套类概要
嵌套类修饰符和类型类说明static final record
static final record
class
-
字段概要
字段修饰符和类型字段说明static final String
private final Path
private final Path
(专用程序包) final com.mojang.datafixers.DataFixer
(专用程序包) static final DateTimeFormatter
(专用程序包) 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
-
构造器概要
构造器构造器说明LevelStorageSource
(Path pBaseDir, Path pBackupDir, DirectoryValidator pWorldDirValidator, com.mojang.datafixers.DataFixer pFixerUpper) -
方法概要
修饰符和类型方法说明createAccess
(String pSaveName) static LevelStorageSource
createDefault
(Path pSavesDir) private static WorldDataConfiguration
getDataConfiguration
(Path pDataFile, com.mojang.datafixers.DataFixer pFixer) (专用程序包) static BiFunction<Path,
com.mojang.datafixers.DataFixer, com.mojang.datafixers.util.Pair<WorldData, WorldDimensions.Complete>> getLevelData
(com.mojang.serialization.DynamicOps<Tag> pOps, WorldDataConfiguration pDataConfiguration, Registry<LevelStem> pLevelStemRegistry, com.mojang.serialization.Lifecycle pLifecycle) private Path
getLevelPath
(String pSaveName) getName()
private int
boolean
isNewLevelIdAcceptable
(String pSaveName) boolean
levelExists
(String pSaveName) (专用程序包) BiFunction<Path,
com.mojang.datafixers.DataFixer, LevelSummary> levelSummaryReader
(LevelStorageSource.LevelDirectory pLevelDirectory, boolean pLocked) loadLevelSummaries
(LevelStorageSource.LevelCandidates pCandidates) private static FeatureFlagSet
parseFeatureFlagsFromSummary
(com.mojang.serialization.Dynamic<?> pDynamic) static DirectoryValidator
parseValidator
(Path pValidator) private static WorldDataConfiguration
readDataConfig
(com.mojang.serialization.Dynamic<?> pDynamic) (专用程序包) <T> T
readLevelData
(LevelStorageSource.LevelDirectory pLevelDirectory, BiFunction<Path, com.mojang.datafixers.DataFixer, T> pLevelDatReader) private static Tag
readLightweightData
(Path pFile) private static <T> com.mojang.serialization.DataResult<WorldGenSettings>
readWorldGenSettings
(com.mojang.serialization.Dynamic<T> pDynamic, com.mojang.datafixers.DataFixer pFixer, int pVersion) validateAndCreateAccess
(String pSaveName)
-
字段详细资料
-
构造器详细资料
-
LevelStorageSource
public LevelStorageSource(Path pBaseDir, Path pBackupDir, DirectoryValidator pWorldDirValidator, com.mojang.datafixers.DataFixer pFixerUpper)
-
-
方法详细资料
-
parseValidator
-
createDefault
-
readWorldGenSettings
private static <T> com.mojang.serialization.DataResult<WorldGenSettings> readWorldGenSettings(com.mojang.serialization.Dynamic<T> pDynamic, com.mojang.datafixers.DataFixer pFixer, int pVersion) -
readDataConfig
-
getName
-
findLevelCandidates
-
loadLevelSummaries
public CompletableFuture<List<LevelSummary>> loadLevelSummaries(LevelStorageSource.LevelCandidates pCandidates) -
getStorageVersion
private int getStorageVersion() -
readLevelData
@Nullable <T> T readLevelData(LevelStorageSource.LevelDirectory pLevelDirectory, BiFunction<Path, com.mojang.datafixers.DataFixer, T> pLevelDatReader) -
getDataConfiguration
@Nullable private static WorldDataConfiguration getDataConfiguration(Path pDataFile, com.mojang.datafixers.DataFixer pFixer) -
getLevelData
static BiFunction<Path,com.mojang.datafixers.DataFixer, getLevelDatacom.mojang.datafixers.util.Pair<WorldData, WorldDimensions.Complete>> (com.mojang.serialization.DynamicOps<Tag> pOps, WorldDataConfiguration pDataConfiguration, Registry<LevelStem> pLevelStemRegistry, com.mojang.serialization.Lifecycle pLifecycle) -
levelSummaryReader
BiFunction<Path,com.mojang.datafixers.DataFixer, levelSummaryReaderLevelSummary> (LevelStorageSource.LevelDirectory pLevelDirectory, boolean pLocked) -
parseFeatureFlagsFromSummary
private static FeatureFlagSet parseFeatureFlagsFromSummary(com.mojang.serialization.Dynamic<?> pDynamic) -
readLightweightData
- 抛出:
IOException
-
isNewLevelIdAcceptable
-
levelExists
-
getLevelPath
-
getBaseDir
-
getBackupPath
-
validateAndCreateAccess
public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(String pSaveName) throws IOException, ContentValidationException -
createAccess
- 抛出:
IOException
-
getWorldDirValidator
-