mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-07-12 17:38:31 +00:00
Merge branch 'main' into '3dSkinRenderer'
This commit is contained in:
@@ -1,18 +1,15 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OMI.Formats.Material;
|
||||
using OMI.Workers.Material;
|
||||
|
||||
namespace PckStudio.Helper
|
||||
namespace PckStudio.Extensions
|
||||
{
|
||||
public static class MaterialResources
|
||||
internal static class MaterialContainerExtensions
|
||||
{
|
||||
public static byte[] MaterialsFileInitializer()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
var matFile = new MaterialContainer
|
||||
{
|
||||
private static readonly MaterialContainer.Material[] defaultMaterials = [
|
||||
new MaterialContainer.Material("bat", "entity_alphatest"),
|
||||
new MaterialContainer.Material("ender_dragon", "entity_emissive_alpha"),
|
||||
new MaterialContainer.Material("blaze_head", "entity_emissive_alpha"),
|
||||
@@ -35,10 +32,11 @@ namespace PckStudio.Helper
|
||||
new MaterialContainer.Material("wither_boss", "entity_alphatest"),
|
||||
new MaterialContainer.Material("wither_skeleton", "entity_alphatest"),
|
||||
new MaterialContainer.Material("wolf", "entity_alphatest_change_color")
|
||||
};
|
||||
var writer = new MaterialFileWriter(matFile);
|
||||
writer.WriteToStream(stream);
|
||||
return stream.ToArray();
|
||||
];
|
||||
|
||||
public static void InitializeDefault(this MaterialContainer materials)
|
||||
{
|
||||
materials.AddRange(defaultMaterials);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@ using PckStudio.Internal;
|
||||
using PckStudio.Internal.App;
|
||||
using SharpMSS;
|
||||
|
||||
namespace PckStudio.API.Miles
|
||||
namespace PckStudio.External.API.Miles
|
||||
{
|
||||
internal static class Binka
|
||||
{
|
||||
@@ -3,7 +3,6 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using PckStudio.API.Miles;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
@@ -11,7 +10,7 @@ using PckStudio.Internal;
|
||||
using System.Text.RegularExpressions;
|
||||
using PckStudio.Internal.App;
|
||||
|
||||
namespace PckStudio.Classes.Utils
|
||||
namespace PckStudio.External.API.Miles
|
||||
{
|
||||
internal static class BinkaConverter
|
||||
{
|
||||
@@ -16,8 +16,7 @@ using OMI.Formats.Pck;
|
||||
using PckStudio.Internal.IO.PckAudio;
|
||||
using PckStudio.Forms.Additional_Popups;
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.API.Miles;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.External.API.Miles;
|
||||
using PckStudio.Internal.FileFormats;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Internal.App;
|
||||
|
||||
@@ -30,8 +30,6 @@ using OMI.Formats.Pck;
|
||||
using OMI.Workers.Color;
|
||||
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Helper;
|
||||
using PckStudio.Internal;
|
||||
using PckStudio.Internal.Deserializer;
|
||||
using PckStudio.Internal.Json;
|
||||
using PckStudio.Internal.Serializer;
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
using System.IO;
|
||||
|
||||
using OMI.Formats.Behaviour;
|
||||
using OMI.Workers.Behaviour;
|
||||
|
||||
namespace PckStudio.Helper
|
||||
{
|
||||
public static class BehaviourResources
|
||||
{
|
||||
internal static byte[] BehaviourFileInitializer()
|
||||
{
|
||||
using var stream = new MemoryStream();
|
||||
var writer = new BehavioursWriter(new BehaviourFile());
|
||||
writer.WriteToStream(stream);
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,14 +7,20 @@ using System.Windows.Forms;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Text.RegularExpressions;
|
||||
using OMI.Formats.Pck;
|
||||
using OMI.Formats.GameRule;
|
||||
using OMI.Formats.Languages;
|
||||
using OMI.Formats.Model;
|
||||
using OMI.Formats.GameRule;
|
||||
using OMI.Formats.Material;
|
||||
using OMI.Formats.Behaviour;
|
||||
using OMI.Formats.Languages;
|
||||
using OMI.Workers;
|
||||
using OMI.Workers.Pck;
|
||||
using OMI.Workers.GameRule;
|
||||
using OMI.Workers.Language;
|
||||
using OMI.Workers.Model;
|
||||
using OMI.Workers.Behaviour;
|
||||
using OMI.Workers.Material;
|
||||
using PckStudio.Properties;
|
||||
using PckStudio.Internal.FileFormats;
|
||||
using PckStudio.Forms;
|
||||
@@ -28,13 +34,10 @@ using PckStudio.Internal;
|
||||
using PckStudio.Forms.Features;
|
||||
using PckStudio.Extensions;
|
||||
using PckStudio.Popups;
|
||||
using PckStudio.Classes.Utils;
|
||||
using PckStudio.Helper;
|
||||
using System.Text.RegularExpressions;
|
||||
using PckStudio.External.API.Miles;
|
||||
using PckStudio.Internal.Json;
|
||||
using PckStudio.Internal.Deserializer;
|
||||
using PckStudio.Internal.Serializer;
|
||||
using OMI.Workers;
|
||||
using PckStudio.Internal.App;
|
||||
using PckStudio.Internal.Skin;
|
||||
|
||||
@@ -2382,7 +2385,7 @@ namespace PckStudio
|
||||
return;
|
||||
}
|
||||
|
||||
currentPCK.CreateNewAsset("behaviours.bin", PckAssetType.BehavioursFile, BehaviourResources.BehaviourFileInitializer);
|
||||
currentPCK.CreateNewAsset("behaviours.bin", PckAssetType.BehavioursFile, new BehavioursWriter(new BehaviourFile()));
|
||||
BuildMainTreeView();
|
||||
}
|
||||
|
||||
@@ -2393,7 +2396,9 @@ namespace PckStudio
|
||||
MessageBox.Show(this, "A behaviours file already exists in this PCK and a new one cannot be created.", "Operation aborted");
|
||||
return;
|
||||
}
|
||||
currentPCK.CreateNewAsset("entityMaterials.bin", PckAssetType.MaterialFile, MaterialResources.MaterialsFileInitializer);
|
||||
var materialContainer = new MaterialContainer();
|
||||
materialContainer.InitializeDefault();
|
||||
currentPCK.CreateNewAsset("entityMaterials.bin", PckAssetType.MaterialFile, new MaterialFileWriter(materialContainer));
|
||||
BuildMainTreeView();
|
||||
}
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@
|
||||
<Reference Include="WindowsFormsIntegration" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Extensions\MaterialContainerExtensions.cs" />
|
||||
<Compile Include="Forms\ContributorsForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -230,7 +231,7 @@
|
||||
<Compile Include="ToolboxItems\ToolStripRadioButtonMenuItem.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Classes\Utils\BinkaConverter.cs" />
|
||||
<Compile Include="External\API\Miles\BinkaConverter.cs" />
|
||||
<Compile Include="Extensions\AnimationExtensions.cs" />
|
||||
<Compile Include="Extensions\ImageLayoutDirection.cs" />
|
||||
<Compile Include="Extensions\ImageSection.cs" />
|
||||
@@ -262,7 +263,7 @@
|
||||
<Compile Include="Extensions\GraphicsExtensions.cs" />
|
||||
<Compile Include="Internal\FileFormats\PSMFile.cs" />
|
||||
<Compile Include="Internal\FileFormats\PckAudioFile.cs" />
|
||||
<Compile Include="Classes\API\Miles\Binka.cs" />
|
||||
<Compile Include="External\API\Miles\Binka.cs" />
|
||||
<Compile Include="Internal\IO\3DST\3DSTextureReader.cs" />
|
||||
<Compile Include="Internal\IO\3DST\3DSTextureWriter.cs" />
|
||||
<Compile Include="Internal\IO\PckAudio\PckAudioFileReader.cs" />
|
||||
@@ -410,8 +411,6 @@
|
||||
<Compile Include="Forms\Additional-Popups\InProgressPrompt.Designer.cs">
|
||||
<DependentUpon>InProgressPrompt.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helper\MaterialResources.cs" />
|
||||
<Compile Include="Helper\BehaviourResources.cs" />
|
||||
<Compile Include="Forms\Editor\BoxEditor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
||||
Reference in New Issue
Block a user