mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-22 22:55:28 +00:00
28 lines
882 B
C#
28 lines
882 B
C#
using System;
|
|
using OMI.Formats.Pck;
|
|
|
|
namespace PckStudio.Core
|
|
{
|
|
public sealed class PackInfo
|
|
{
|
|
public static readonly PackInfo Empty = new PackInfo(default, default, default);
|
|
public bool IsValid { get; }
|
|
public PckFile File { get; }
|
|
public OMI.ByteOrder ByteOrder { get; }
|
|
|
|
public bool AllowByteOrderSwap { get; }
|
|
|
|
public static PackInfo Create(PckFile file, OMI.ByteOrder byteOrder, bool allowByteOrderSwap)
|
|
{
|
|
return new PackInfo(file, byteOrder, allowByteOrderSwap);
|
|
}
|
|
|
|
private PackInfo(PckFile file, OMI.ByteOrder byteOrder, bool allowByteOrderSwap)
|
|
{
|
|
File = file;
|
|
ByteOrder = byteOrder;
|
|
AllowByteOrderSwap = allowByteOrderSwap;
|
|
IsValid = file is not null && Enum.IsDefined(typeof(OMI.ByteOrder), byteOrder);
|
|
}
|
|
}
|
|
} |