# Your first block

Create a custom block, from texture to the block placed in-game.

> **Video coming soon:** a demonstration video for this step is on its way. In the meantime, follow the steps below.

## Before you begin

You need a **JAVA** project and a `CUSTOM_BLOCK` folder. See [Getting started](/get-started/quick-start).

## 1. Open the folder

Click the folder in the left sidebar. The workspace opens: 3D preview at top-left, preparation area (**Staging area**) on the right, atlas at bottom.

## 2. Add textures

Click **Add textures** at the bottom and choose your PNGs. Vyse places them in the atlas. A texture already present (even with identical content) is reused.

## 3. Create the block

Click **Add block(s)**, choose the face layout, assign textures, then **Save staged changes**.

| Layout | Faces to fill |
|---|---|
| `UNITED` | `ALL` : one texture everywhere |
| `COLUMN` | `ENDS` (top, bottom), `SIDES` |
| `FURNACE` | `FRONT`, `BACK`, `SIDES`, `ENDS` |
| `LOOM` | `FRONT`, `SIDES`, `TOP`, `BOTTOM` |
| `FLOORING` | `TOP`, `BOTTOM`, `SIDES` |
| `CROSS` | `SIDES` (leaves) |
| `CUSTOM` | `NORTH`, `SOUTH`, `EAST`, `WEST`, `UP`, `DOWN` |

Multiple texture sets on the same block make it an **alternative** block: Minecraft chooses one at random, based on its weight (`weight`).

## 4. Export and import

Click **Quick export**, then on the server:

<command>/vyse import latest</command>

## The same thing with the API

```bash
# 1. The texture (PNG in base64)
curl -X POST "https://api.vyse.cloud/api/v1/projects/<projectId>/textures" \
  -H "Authorization: Bearer vyse_..." -H "Content-Type: application/json" \
  -d '{"slug": "polished_stone", "objectType": "BLOCK_CUSTOM", "pngBase64": "iVBORw0KGgo..."}'

# 2. The block, with the texture id
curl -X POST "https://api.vyse.cloud/api/v1/projects/<projectId>/java/directories/<directoryId>/blocks" \
  -H "Authorization: Bearer vyse_..." -H "Content-Type: application/json" \
  -d '{"name": "Polished stone", "textureSets": [{"presetLayout": "UNITED", "textures": {"ALL": "<textureId>"}}]}'
```

With an AI assistant connected to the [MCP server](/automate/the-mcp-server), just ask: "Create a Polished stone block with this texture in the Stones folder."

## Block settings

| Field | Values | Effect |
|---|---|---|
| `blockType` | `REAL_NOTE` (default), `REAL`, `REAL_TRANSPARENT`, `REAL_WIRE` | Server block used: musical block, chorus plant (transparent textures) or trigger wire |
| `directionalPlacement` | `NONE`, `ALL`, `FURNACE`, `LOG`, `DROPPER` | Orientation based on how the player places the block |
| `wireVariantCount` | 1 and more | `REAL_WIRE` only: reserved states |

## Next steps

- [Your first supply](/first-steps/your-first-furniture-item)
- [The API](/automate/the-api)
