diff --git a/PCK-Studio/External/Format/BlockBenchModel.cs b/PCK-Studio/External/Format/BlockBenchModel.cs index 80317ea8..5b49b8da 100644 --- a/PCK-Studio/External/Format/BlockBenchModel.cs +++ b/PCK-Studio/External/Format/BlockBenchModel.cs @@ -138,6 +138,7 @@ namespace PckStudio.External.Format internal class Texture { public static implicit operator Texture(Image image) => new Texture(image); + public static implicit operator Image(Texture texture) => texture.GetImage(); private Texture() { } @@ -154,7 +155,7 @@ namespace PckStudio.External.Format [JsonProperty("source")] internal string TextureSource; - internal Image GetTexture() + private Image GetImage() { string data = TextureSource; const string dataHead = "data:image/png;base64,"; diff --git a/PCK-Studio/Internal/ModelImporter.cs b/PCK-Studio/Internal/ModelImporter.cs index 402e22ff..8c8a8fc9 100644 --- a/PCK-Studio/Internal/ModelImporter.cs +++ b/PCK-Studio/Internal/ModelImporter.cs @@ -124,7 +124,7 @@ namespace PckStudio.Internal if (blockBenchModel.Textures.IndexInRange(0)) { - modelInfo.Texture = blockBenchModel.Textures[0].GetTexture(); + modelInfo.Texture = blockBenchModel.Textures[0]; modelInfo.ANIM.SetFlag(SkinAnimFlag.RESOLUTION_64x64, modelInfo.Texture.Size.Width == modelInfo.Texture.Size.Height); }