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 PathMatcher
private static final String
private static final int
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_) (package private) static Instant
getFileModificationTime
(Path p_307529_) private static long
static LevelDataAndDimensions
getLevelDataAndDimensions
(com.mojang.serialization.Dynamic<?> p_307313_, WorldDataConfiguration p_307486_, Registry<LevelStem> p_307597_, RegistryAccess.Frozen p_307648_) getLevelPath
(String p_289974_) getName()
static WorldLoader.PackConfig
getPackConfig
(com.mojang.serialization.Dynamic<?> p_307282_, PackRepository p_307421_, boolean p_307393_) private int
boolean
isNewLevelIdAcceptable
(String p_78241_) boolean
levelExists
(String p_78256_) (package private) LevelSummary
makeLevelSummary
(com.mojang.serialization.Dynamic<?> p_307300_, LevelStorageSource.LevelDirectory p_307426_, boolean p_307364_) private static FeatureFlagSet
parseFeatureFlagsFromSummary
(com.mojang.serialization.Dynamic<?> p_249466_) static DirectoryValidator
parseValidator
(Path p_289968_) static WorldDataConfiguration
readDataConfig
(com.mojang.serialization.Dynamic<?> p_250884_) (package private) static com.mojang.serialization.Dynamic<?>
readLevelDataTagFixed
(Path p_307371_, com.mojang.datafixers.DataFixer p_307468_) (package private) static CompoundTag
readLevelDataTagRaw
(Path p_307408_) private LevelSummary
readLevelSummary
(LevelStorageSource.LevelDirectory p_307237_, boolean p_307368_) private static Tag
readLightweightData
(Path p_230837_) validateAndCreateAccess
(String p_289980_) private static <T> com.mojang.serialization.Dynamic<T>
wrapWithRegistryOps
(com.mojang.serialization.Dynamic<T> p_307453_, RegistryAccess.Frozen p_307321_)
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
FORMATTER
-
TAG_DATA
- See Also:
-
NO_SYMLINKS_ALLOWED
-
ALLOWED_SYMLINKS_CONFIG_NAME
- See Also:
-
UNCOMPRESSED_NBT_QUOTA
private static final int UNCOMPRESSED_NBT_QUOTA- 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
-
readDataConfig
-
getPackConfig
public static WorldLoader.PackConfig getPackConfig(com.mojang.serialization.Dynamic<?> p_307282_, PackRepository p_307421_, boolean p_307393_) -
getLevelDataAndDimensions
public static LevelDataAndDimensions getLevelDataAndDimensions(com.mojang.serialization.Dynamic<?> p_307313_, WorldDataConfiguration p_307486_, Registry<LevelStem> p_307597_, RegistryAccess.Frozen p_307648_) -
wrapWithRegistryOps
private static <T> com.mojang.serialization.Dynamic<T> wrapWithRegistryOps(com.mojang.serialization.Dynamic<T> p_307453_, RegistryAccess.Frozen p_307321_) -
getName
-
findLevelCandidates
- Throws:
LevelStorageException
-
loadLevelSummaries
public CompletableFuture<List<LevelSummary>> loadLevelSummaries(LevelStorageSource.LevelCandidates p_230814_) -
getStorageVersion
private int getStorageVersion() -
readLevelDataTagRaw
- Throws:
IOException
-
readLevelDataTagFixed
static com.mojang.serialization.Dynamic<?> readLevelDataTagFixed(Path p_307371_, com.mojang.datafixers.DataFixer p_307468_) throws IOException - Throws:
IOException
-
readLevelSummary
private LevelSummary readLevelSummary(LevelStorageSource.LevelDirectory p_307237_, boolean p_307368_) -
getFileModificationTime
-
getFileModificationTime
-
makeLevelSummary
LevelSummary makeLevelSummary(com.mojang.serialization.Dynamic<?> p_307300_, LevelStorageSource.LevelDirectory p_307426_, boolean p_307364_) -
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
-