类 StructureTemplateManager
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager
-
嵌套类概要
嵌套类修饰符和类型类说明(专用程序包) static interface
(专用程序包) static final record
-
字段概要
字段修饰符和类型字段说明private final HolderGetter<Block>
private final com.mojang.datafixers.DataFixer
private final Path
private static final FileToIdConverter
private static final org.slf4j.Logger
private ResourceManager
private final List<StructureTemplateManager.Source>
private static final String
private static final String
private static final String
private final Map<ResourceLocation,
Optional<StructureTemplate>> private static final String
-
构造器概要
构造器构造器说明StructureTemplateManager
(ResourceManager pResourceManager, LevelStorageSource.LevelStorageAccess pLevelStorageAccess, com.mojang.datafixers.DataFixer pFixerUpper, HolderGetter<Block> pBlockLookup) -
方法概要
修饰符和类型方法说明private static Path
createAndValidatePathToStructure
(Path pPath, ResourceLocation pId, String pExtension) static Path
createPathToStructure
(Path pPath, ResourceLocation pId, String pExtension) get
(ResourceLocation pId) getPathToGeneratedStructure
(ResourceLocation pId, String pExtension) private Stream<ResourceLocation>
listFolderContents
(Path pFolder, String pNamespace, String pPath) private Stream<ResourceLocation>
private Stream<ResourceLocation>
listGeneratedInNamespace
(Path pPath) private Stream<ResourceLocation>
private Stream<ResourceLocation>
private Optional<StructureTemplate>
load
(StructureTemplateManager.InputStreamOpener p_230373_, Consumer<Throwable> p_230374_) private Optional<StructureTemplate>
loadFromGenerated
(ResourceLocation p_230432_) private Optional<StructureTemplate>
loadFromResource
(ResourceLocation p_230428_) private Optional<StructureTemplate>
loadFromSnbt
(ResourceLocation p_230368_, Path p_230369_) private Optional<StructureTemplate>
loadFromTestStructures
(ResourceLocation p_230430_) void
onResourceManagerReload
(ResourceManager pResourceManager) private StructureTemplate
readStructure
(InputStream pStream) readStructure
(CompoundTag pNbt) private String
relativize
(Path pRoot, Path pPath) void
remove
(ResourceLocation pId) boolean
save
(ResourceLocation pId) private Optional<StructureTemplate>
tryLoad
(ResourceLocation p_230426_)
-
字段详细资料
-
LOGGER
private static final org.slf4j.Logger LOGGER -
STRUCTURE_DIRECTORY_NAME
- 另请参阅:
-
TEST_STRUCTURES_DIR
- 另请参阅:
-
STRUCTURE_FILE_EXTENSION
- 另请参阅:
-
STRUCTURE_TEXT_FILE_EXTENSION
- 另请参阅:
-
structureRepository
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
resourceManager
-
generatedDir
-
sources
-
blockLookup
-
LISTER
-
-
构造器详细资料
-
StructureTemplateManager
public StructureTemplateManager(ResourceManager pResourceManager, LevelStorageSource.LevelStorageAccess pLevelStorageAccess, com.mojang.datafixers.DataFixer pFixerUpper, HolderGetter<Block> pBlockLookup)
-
-
方法详细资料
-
getOrCreate
-
get
-
listTemplates
-
tryLoad
-
onResourceManagerReload
-
loadFromResource
-
listResources
-
loadFromTestStructures
-
listTestStructures
-
loadFromGenerated
-
listGenerated
-
listGeneratedInNamespace
-
listFolderContents
-
relativize
-
loadFromSnbt
-
load
private Optional<StructureTemplate> load(StructureTemplateManager.InputStreamOpener p_230373_, Consumer<Throwable> p_230374_) -
readStructure
- 抛出:
IOException
-
readStructure
-
save
-
getPathToGeneratedStructure
-
createPathToStructure
-
createAndValidatePathToStructure
private static Path createAndValidatePathToStructure(Path pPath, ResourceLocation pId, String pExtension) -
remove
-