public class TemplateManager extends java.lang.Object implements IResourceManagerReloadListener
IFutureReloadListener.IStage
Modifier and Type | Field and Description |
---|---|
private com.mojang.datafixers.DataFixer |
fixer |
private static org.apache.logging.log4j.Logger |
LOGGER |
private MinecraftServer |
minecraftServer |
private java.nio.file.Path |
pathGenerated |
private java.util.Map<ResourceLocation,Template> |
templates |
Constructor and Description |
---|
TemplateManager(MinecraftServer server,
java.io.File templateFolder,
com.mojang.datafixers.DataFixer fixerIn) |
Modifier and Type | Method and Description |
---|---|
Template |
func_227458_a_(CompoundNBT p_227458_1_) |
Template |
getTemplate(ResourceLocation p_200219_1_) |
Template |
getTemplateDefaulted(ResourceLocation p_200220_1_) |
private Template |
loadTemplate(java.io.InputStream inputStreamIn) |
private Template |
loadTemplateFile(ResourceLocation locationIn) |
private Template |
loadTemplateResource(ResourceLocation p_209201_1_) |
void |
onResourceManagerReload(IResourceManager resourceManager) |
void |
remove(ResourceLocation templatePath) |
private java.nio.file.Path |
resolvePath(ResourceLocation locationIn,
java.lang.String extIn) |
java.nio.file.Path |
resolvePathStructures(ResourceLocation locationIn,
java.lang.String extIn) |
boolean |
writeToFile(ResourceLocation templateName) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getResourceType, reload
func_225594_i_
private static final org.apache.logging.log4j.Logger LOGGER
private final java.util.Map<ResourceLocation,Template> templates
private final com.mojang.datafixers.DataFixer fixer
private final MinecraftServer minecraftServer
private final java.nio.file.Path pathGenerated
public TemplateManager(MinecraftServer server, java.io.File templateFolder, com.mojang.datafixers.DataFixer fixerIn)
public Template getTemplateDefaulted(ResourceLocation p_200220_1_)
@Nullable public Template getTemplate(ResourceLocation p_200219_1_)
public void onResourceManagerReload(IResourceManager resourceManager)
onResourceManagerReload
in interface IResourceManagerReloadListener
@Nullable private Template loadTemplateResource(ResourceLocation p_209201_1_)
@Nullable private Template loadTemplateFile(ResourceLocation locationIn)
private Template loadTemplate(java.io.InputStream inputStreamIn) throws java.io.IOException
java.io.IOException
public Template func_227458_a_(CompoundNBT p_227458_1_)
public boolean writeToFile(ResourceLocation templateName)
public java.nio.file.Path resolvePathStructures(ResourceLocation locationIn, java.lang.String extIn)
private java.nio.file.Path resolvePath(ResourceLocation locationIn, java.lang.String extIn)
public void remove(ResourceLocation templatePath)