Class StructureManager
java.lang.Object
net.minecraft.world.level.levelgen.structure.templatesystem.StructureManager
-
Field Summary
Modifier and TypeFieldDescriptionprivate com.mojang.datafixers.DataFixer
private Path
private static org.apache.logging.log4j.Logger
private ResourceManager
private static String
private static String
private static String
private Map<ResourceLocation,Optional<StructureTemplate>>
-
Constructor Summary
ConstructorDescriptionStructureManager(ResourceManager p_74332_, LevelStorageSource.LevelStorageAccess p_74333_, com.mojang.datafixers.DataFixer p_74334_)
-
Method Summary
Modifier and TypeMethodDescriptionprivate Path
createAndValidatePathToStructure(ResourceLocation p_74349_, String p_74350_)
createPathToStructure(ResourceLocation p_74344_, String p_74345_)
get(ResourceLocation p_163775_)
getOrCreate(ResourceLocation p_74342_)
private Optional<StructureTemplate>
loadFromGenerated(ResourceLocation p_163779_)
private Optional<StructureTemplate>
loadFromResource(ResourceLocation p_163777_)
void
onResourceManagerReload(ResourceManager p_74336_)
private StructureTemplate
readStructure(InputStream p_74338_)
readStructure(CompoundTag p_74340_)
void
remove(ResourceLocation p_74354_)
boolean
save(ResourceLocation p_74352_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
STRUCTURE_DIRECTORY_NAME
- See Also:
- Constant Field Values
-
STRUCTURE_FILE_EXTENSION
- See Also:
- Constant Field Values
-
STRUCTURE_TEXT_FILE_EXTENSION
- See Also:
- Constant Field Values
-
structureRepository
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
resourceManager
-
generatedDir
-
-
Constructor Details
-
StructureManager
public StructureManager(ResourceManager p_74332_, LevelStorageSource.LevelStorageAccess p_74333_, com.mojang.datafixers.DataFixer p_74334_)
-
-
Method Details
-
getOrCreate
-
get
-
onResourceManagerReload
-
loadFromResource
-
loadFromGenerated
-
readStructure
- Throws:
IOException
-
readStructure
-
save
-
createPathToStructure
-
createAndValidatePathToStructure
-
remove
-