public TextureModelHeader(ref BinaryReader reader)
        {
            TimOffset = GetTIMOffset(ref reader);
            reader.BaseStream.Position = 0x04; //Ensure we reset the position of the stream to the model texture
            timOffsetTerminator        = reader.ReadInt32();
            if (timOffsetTerminator != 0x00)
            {
                DigimonWorld2ToolForm.Main.AddErrorToLogWindow($"No 0x00 terminator found after TIM pointer.");
                return;
            }

            BonesCount = reader.ReadInt32();

            HeaderPointers        = GetHeaderPointers(ref reader);
            HeaderPointersOrdered = HeaderPointers.OrderBy(i => i).ToArray();

            Bones = GetBones(ref reader);
            EyeTextureAnimationOffsets = GetEyeTextureAnimationOffsets(ref reader);

            BodyPartsHeader = new ModelBodyPartHeader[Bones.Length];
            for (int i = 0; i < BodyPartsHeader.Length; i++)
            {
                BodyPartsHeader[i] = new ModelBodyPartHeader(ref reader);
            }

            WriteToFile();
        }
        private void WriteVertexDataToFile(StreamWriter writer, int[] pointerArray, int i, ModelBodyPartHeader item)
        {
            writer.WriteLine($"[Address: 0x{HeaderPointersOrdered[i + 1]:X6}]");
            PrintShortAsFourByteHex(item.VerticalVertexAllignmentByte, writer, false);
            writer.Write($"// Vertex allignment byte");
            writer.Write(Environment.NewLine);

            foreach (var vertex in item.VerticalFaceVertexData)
            {
                PrintShortAsFourByteHex((short)vertex.x, writer, false);
                writer.Write(" ");

                PrintShortAsFourByteHex((short)vertex.y, writer, false);
                writer.Write(" ");

                PrintShortAsFourByteHex((short)vertex.z, writer, false);
                writer.Write(Environment.NewLine);
            }

            if (item.VerticalVertexPaddingBytes != null)
            {
                foreach (var padding in item.VerticalVertexPaddingBytes)
                {
                    writer.Write(padding);
                }

                writer.Write($" //Word padding bytes");
                writer.Write(Environment.NewLine);
            }
            writer.Write(Environment.NewLine);
        }