# Skin Combiner

Skin Combiner создает новый Minecraft-скин: берет голову из скина игрока и переносит ее на указанный скин тела.

#### Запрос

```json
{
  "username": "DominosMersi",
  "components": {
    "minecraft:profile": {
      "name": "DominosMersi",
      "properties": [
        {
          "name": "textures",
          "value": "BASE64_TEXTURES_VALUE",
          "signature": "OPTIONAL_SIGNATURE"
        }
      ]
    }
  },
  "body_skin_url": "https://textures.minecraft.net/texture/BODY_SKIN_HASH"
}
```

### Поля

<table><thead><tr><th width="406">Название поля</th><th>Предназначение поля</th></tr></thead><tbody><tr><td>username</td><td>Имя пользователя. Обязательное поле. Возвращается обратно в ответе.</td></tr><tr><td>components</td><td>Minecraft components объекта головы игрока. API использует компонент minecraft:profile.</td></tr><tr><td>components.minecraft:profile.properties[0].value</td><td>Base64-строка с данными о скине игрока. Из нее API получает URL скина, откуда будет взята голова.</td></tr><tr><td>body_skin_url</td><td>Прямая ссылка на PNG-скин тела. Скин должен быть размером 64x64.</td></tr></tbody></table>

### Пример запроса на python

```python
import requests

API_URL = "https://dominosmersi.ru/api/skin-combine"

payload = {
    "username": "PlayerName",
    "components": {
        "minecraft:profile": {
            "properties": [
                {
                    "name": "textures",
                    "value": "BASE64_TEXTURES_VALUE"
                }
            ]
        }
    },
    "body_skin_url": "https://textures.minecraft.net/texture/BODY_SKIN_TEXTURE_HASH"
}

response = requests.post(API_URL, json=payload, timeout=15)
data = response.json()

if response.ok:
    print("Combined skin:", data["combined_skin_url"])
    print("Head model:", data["head_skin_model"])
    print("Body model:", data["body_skin_model"])
else:
    print("Error:", data.get("error"))
```

### Пример успешного ответа

```json
{
  "username": "PlayerName",
  "combined_skin_url": "https://dominosmersi.ru/static/combined_4f6b2c.png",
  "head_skin_model": "slim",
  "body_skin_model": "classic",
  "head_skin_is_slim": true,
  "body_skin_is_slim": false
}
```

### Важно

**body\_skin\_url** должен быть прямой ссылкой на PNG-скин. Если ссылка открывает страницу сайта, а не саму картинку, API не сможет обработать скин.

### Где используется

Используется в модуле **SkinCombiner** на сервере JustMC.\
Загрузить модуль можно командой /module load DominosMersi/SkinCombine.

[ветка в дискорде](https://discord.com/channels/828678938070745129/1353639904332218399)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://justapi.dominosmersi.ru/user-api/skin-combiner.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
