Beispiel #1
0
 /// <summary>
 /// Creates a new <see cref="Datapack"/> with the given parameters. Inherite from this constructor.
 /// </summary>
 /// <param name="path">The path to the folder to create this datapack in</param>
 /// <param name="packName">The datapack's name</param>
 /// <param name="description">The datapack's description</param>
 /// <param name="packFormat">The datapack's format</param>
 /// <param name="fileCreator">Class for creating files and directories</param>
 /// <param name="_">Unused parameter used for specifing you want to use this constructor</param>
 /// <param name="settings">Datapack settings</param>
 protected Datapack(string path, string packName, string description, int packFormat, IFileCreator fileCreator, IDatapackSetting[]?settings, bool _) : base(path, packName, fileCreator, settings)
 {
     FileCreator.CreateDirectory(Path + "/" + Name);
     using TextWriter metaWriter = FileCreator.CreateWriter(Path + "/" + Name + "/pack.mcmeta");
     metaWriter.Write("{\"pack\":{\"pack_format\":" + packFormat + ",\"description\":\"" + description + "\"}}");
 }