Package net.minecraft.data.structures
Class SnbtToNbt
java.lang.Object
net.minecraft.data.structures.SnbtToNbt
- All Implemented Interfaces:
DataProvider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
(package private) static class
Wraps exceptions thrown while reading structures to include the path of the structure in the exception message.(package private) static final record
Nested classes/interfaces inherited from interface net.minecraft.data.DataProvider
DataProvider.Factory<T extends DataProvider>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List
<SnbtToNbt.Filter> private static final org.slf4j.Logger
private final PackOutput
Fields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, INDENT_WIDTH, KEY_COMPARATOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFilter
(SnbtToNbt.Filter pFilter) private CompoundTag
applyFilters
(String pFileName, CompoundTag pTag) final String
getName()
private String
Gets the name of the given SNBT file, based on its path and the input directory.private SnbtToNbt.TaskResult
readStructure
(Path pFilePath, String pFileName) run
(CachedOutput pOutput) private void
storeStructureIfChanged
(CachedOutput pOutput, SnbtToNbt.TaskResult pTaskResult, Path pDirectoryPath)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
output
-
inputFolders
-
filters
-
-
Constructor Details
-
SnbtToNbt
-
-
Method Details
-
addFilter
-
applyFilters
-
run
- Specified by:
run
in interfaceDataProvider
-
getName
- Specified by:
getName
in interfaceDataProvider
-
getName
Gets the name of the given SNBT file, based on its path and the input directory. The result does not have the ".snbt" extension. -
readStructure
-
storeStructureIfChanged
private void storeStructureIfChanged(CachedOutput pOutput, SnbtToNbt.TaskResult pTaskResult, Path pDirectoryPath)
-