Class StructureTemplateManager
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final FileToIdConverterstatic final FileToIdConverterprivate final ResourceManagerTemplateSourceprivate final List<TemplateSource> static final Stringprivate static final Stringprivate static final Stringprivate final Map<Identifier, Optional<StructureTemplate>> private final @Nullable TemplatePathFactorystatic final FileToIdConverterprivate static final FileToIdConverterprivate final TemplatePathFactory -
Constructor Summary
ConstructorsConstructorDescriptionStructureTemplateManager(ResourceManager resourceManager, LevelStorageSource.LevelStorageAccess storage, com.mojang.datafixers.DataFixer fixerUpper, HolderGetter<Block> blockLookup) -
Method Summary
Modifier and TypeMethodDescriptionget(Identifier id) voidonResourceManagerReload(ResourceManager resourceManager) voidremove(Identifier id) static booleansave(Path file, StructureTemplate structureTemplate, boolean asText) booleansave(Identifier id) @Nullable TemplatePathFactoryprivate Optional<StructureTemplate> tryLoad(Identifier id)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
STRUCTURE_FILE_EXTENSION
- See Also:
-
STRUCTURE_TEXT_FILE_EXTENSION
- See Also:
-
STRUCTURE_DIRECTORY_NAME
- See Also:
-
WORLD_STRUCTURE_LISTER
-
WORLD_TEXT_STRUCTURE_LISTER
-
RESOURCE_STRUCTURE_LISTER
-
RESOURCE_TEXT_STRUCTURE_LISTER
-
structureRepository
-
resourceManagerSource
-
sources
-
worldTemplates
-
testTemplates
-
-
Constructor Details
-
StructureTemplateManager
public StructureTemplateManager(ResourceManager resourceManager, LevelStorageSource.LevelStorageAccess storage, com.mojang.datafixers.DataFixer fixerUpper, HolderGetter<Block> blockLookup)
-
-
Method Details
-
getOrCreate
-
get
-
listTemplates
-
tryLoad
-
onResourceManagerReload
-
save
-
save
public static boolean save(Path file, StructureTemplate structureTemplate, boolean asText) throws IOException - Throws:
IOException
-
worldTemplates
-
testTemplates
-
remove
-