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 classWraps exceptions thrown while reading structures to include the path of the structure in the exception message.(package private) static final recordNested 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.Loggerprivate final PackOutputFields inherited from interface net.minecraft.data.DataProvider
FIXED_ORDER_FIELDS, INDENT_WIDTH, KEY_COMPARATOR -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFilter(SnbtToNbt.Filter filter) private CompoundTagapplyFilters(String fileName, CompoundTag tag) final StringgetName()private StringGets the name of the given SNBT file, based on its path and the input directory.private SnbtToNbt.TaskResultreadStructure(Path filePath, String fileName) run(CachedOutput output) private voidstoreStructureIfChanged(CachedOutput output, SnbtToNbt.TaskResult taskResult, Path directoryPath)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
output
-
inputFolders
-
filters
-
-
Constructor Details
-
SnbtToNbt
-
-
Method Details
-
addFilter
-
applyFilters
-
run
- Specified by:
runin interfaceDataProvider
-
getName
- Specified by:
getNamein 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 output, SnbtToNbt.TaskResult taskResult, Path directoryPath)
-