diff --git a/MinecraftUSkinEditor/Classes/IO/Sounds/SoundIO.cs b/MinecraftUSkinEditor/Classes/IO/Sounds/SoundIO.cs new file mode 100644 index 00000000..5815d356 --- /dev/null +++ b/MinecraftUSkinEditor/Classes/IO/Sounds/SoundIO.cs @@ -0,0 +1,26 @@ +using System; +using System.IO; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json; + +namespace PckStudio.Classes.IO.Sounds +{ + public class SoundIO + { + public Dictionary Read(string Filepath) + { + var jObj = (Newtonsoft.Json.Linq.JObject)JsonConvert.DeserializeObject(File.ReadAllText(Filepath)); + var dict = JsonConvert.DeserializeObject>(jObj.ToString()); + + return dict; + } + + public string Serialize(Dictionary input) + { + return JsonConvert.SerializeObject(input, Formatting.Indented); + } + } +} diff --git a/MinecraftUSkinEditor/Classes/IO/Sounds/Sounds.cs b/MinecraftUSkinEditor/Classes/IO/Sounds/Sounds.cs new file mode 100644 index 00000000..a040eff3 --- /dev/null +++ b/MinecraftUSkinEditor/Classes/IO/Sounds/Sounds.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace PckStudio.Classes.IO.Sounds +{ + public class Type + { + public bool replace { get; set; } + public List sounds = new List(); + } + + public class Sound + { + public string name { get; set; } + public string type { get; set; } + public bool stream { get; set; } + } +} diff --git a/MinecraftUSkinEditor/PckStudio.csproj b/MinecraftUSkinEditor/PckStudio.csproj index c1e113f4..0188da44 100644 --- a/MinecraftUSkinEditor/PckStudio.csproj +++ b/MinecraftUSkinEditor/PckStudio.csproj @@ -149,6 +149,8 @@ + +