Class TemplateManager
- java.lang.Object
-
- net.minecraft.world.gen.feature.template.TemplateManager
-
public class TemplateManager extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private com.mojang.datafixers.DataFixer
fixerUpper
private java.nio.file.Path
generatedDir
private static org.apache.logging.log4j.Logger
LOGGER
private IResourceManager
resourceManager
private java.util.Map<ResourceLocation,Template>
structureRepository
-
Constructor Summary
Constructors Constructor Description TemplateManager(IResourceManager p_i232119_1_, SaveFormat.LevelSave p_i232119_2_, com.mojang.datafixers.DataFixer p_i232119_3_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.nio.file.Path
createAndValidatePathToStructure(ResourceLocation p_209510_1_, java.lang.String p_209510_2_)
java.nio.file.Path
createPathToStructure(ResourceLocation p_209509_1_, java.lang.String p_209509_2_)
Template
get(ResourceLocation p_200219_1_)
Template
getOrCreate(ResourceLocation p_200220_1_)
private Template
loadFromGenerated(ResourceLocation p_195428_1_)
private Template
loadFromResource(ResourceLocation p_209201_1_)
void
onResourceManagerReload(IResourceManager p_195410_1_)
private Template
readStructure(java.io.InputStream p_209205_1_)
Template
readStructure(CompoundNBT p_227458_1_)
void
remove(ResourceLocation p_189941_1_)
boolean
save(ResourceLocation p_195429_1_)
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
structureRepository
private final java.util.Map<ResourceLocation,Template> structureRepository
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper
-
resourceManager
private IResourceManager resourceManager
-
generatedDir
private final java.nio.file.Path generatedDir
-
-
Constructor Detail
-
TemplateManager
public TemplateManager(IResourceManager p_i232119_1_, SaveFormat.LevelSave p_i232119_2_, com.mojang.datafixers.DataFixer p_i232119_3_)
-
-
Method Detail
-
getOrCreate
public Template getOrCreate(ResourceLocation p_200220_1_)
-
get
@Nullable public Template get(ResourceLocation p_200219_1_)
-
onResourceManagerReload
public void onResourceManagerReload(IResourceManager p_195410_1_)
-
loadFromResource
@Nullable private Template loadFromResource(ResourceLocation p_209201_1_)
-
loadFromGenerated
@Nullable private Template loadFromGenerated(ResourceLocation p_195428_1_)
-
readStructure
private Template readStructure(java.io.InputStream p_209205_1_) throws java.io.IOException
- Throws:
java.io.IOException
-
readStructure
public Template readStructure(CompoundNBT p_227458_1_)
-
save
public boolean save(ResourceLocation p_195429_1_)
-
createPathToStructure
public java.nio.file.Path createPathToStructure(ResourceLocation p_209509_1_, java.lang.String p_209509_2_)
-
createAndValidatePathToStructure
private java.nio.file.Path createAndValidatePathToStructure(ResourceLocation p_209510_1_, java.lang.String p_209510_2_)
-
remove
public void remove(ResourceLocation p_189941_1_)
-
-