mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-23 15:54:31 +00:00
Template packs now include pack comparison and icon images
This commit is contained in:
@@ -1204,6 +1204,26 @@ namespace PckStudio
|
||||
var texturepackInfo = new PCKFile.FileData($"{res}/{res}Info.pck", PCKFile.FileData.FileType.TexturePackInfoFile);
|
||||
texturepackInfo.properties.Add(("PACKID", "0"));
|
||||
texturepackInfo.properties.Add(("DATAPATH", $"{res}Data.pck"));
|
||||
|
||||
PCKFile infoPCK = new PCKFile(3);
|
||||
|
||||
var ms = new MemoryStream();
|
||||
var ms2 = new MemoryStream();
|
||||
var ms3 = new MemoryStream();
|
||||
|
||||
var comparison = new PCKFile.FileData("comparison.png", PCKFile.FileData.FileType.TextureFile);
|
||||
Resources.Comparison.Save(ms, ImageFormat.Png);
|
||||
comparison.SetData(ms.ToArray());
|
||||
|
||||
var icon = new PCKFile.FileData("icon.png", PCKFile.FileData.FileType.TextureFile);
|
||||
Resources.TexturePackIcon.Save(ms2, ImageFormat.Png);
|
||||
icon.SetData(ms2.ToArray());
|
||||
|
||||
infoPCK.Files.Add(icon);
|
||||
infoPCK.Files.Add(comparison);
|
||||
|
||||
PCKFileWriter.Write(ms3, infoPCK, LittleEndianCheckBox.Checked);
|
||||
texturepackInfo.SetData(ms3.ToArray());
|
||||
currentPCK.Files.Add(texturepackInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user