static void DefineModel(Player p, CustomModel model, CustomModelPart[] parts)
        {
            bool hasV1 = p.Supports(CpeExt.CustomModels, 1);
            bool hasV2 = p.Supports(CpeExt.CustomModels, 2);

            if (hasV1 || hasV2)
            {
                var modelId = GetModelId(p, model.name, true).Value;
                Debug("DefineModel {0} {1} {2}", modelId, p.name, model.name);

                model.partCount = (byte)parts.Length;
                byte[] modelPacket = Packet.DefineModel(modelId, model);
                p.Send(modelPacket);

                foreach (var part in parts)
                {
                    if (hasV2)
                    {
                        p.Send(Packet.DefineModelPartV2(modelId, part));
                    }
                    else if (hasV1)
                    {
                        p.Send(Packet.DefineModelPart(modelId, part));
                    }
                }
            }
        }