mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-07-03 08:04:32 +00:00
34 lines
1005 B
C#
34 lines
1005 B
C#
using Newtonsoft.Json.Linq;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.IO;
|
|
|
|
using PckStudio.Properties;
|
|
using PckStudio.Extensions;
|
|
using OMI.Formats.Pck;
|
|
using OMI.Formats.Material;
|
|
using OMI.Workers.Material;
|
|
using System;
|
|
|
|
namespace PckStudio.Forms.Utilities
|
|
{
|
|
public static class MaterialResources
|
|
{
|
|
public static readonly JObject entityData = JObject.Parse(Resources.entityData);
|
|
private static Image[] _entityImages;
|
|
public static Image[] entityImages => _entityImages ??= Resources.entities_sheet.CreateImageList(32).ToArray();
|
|
|
|
public static byte[] MaterialsFileInitializer()
|
|
{
|
|
using var stream = new MemoryStream();
|
|
var matFile = new MaterialContainer
|
|
{
|
|
new MaterialContainer.Material("bat", "entity_alphatest")
|
|
};
|
|
var writer = new MaterialFileWriter(matFile);
|
|
writer.WriteToStream(stream);
|
|
return stream.ToArray();
|
|
}
|
|
}
|
|
}
|