> For the complete documentation index, see [llms.txt](https://developers.wiki.resourcefulbees.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.wiki.resourcefulbees.com/formats/honey/bottle.md).

# Bottle Serializer

Serializer ID: `resourcefulbees:bottle/v1`

This is the required built-in honey serializer. It controls bottle color, food behavior, rarity, the backing bottle item, and optional trade data.

## Fields

| Field         | Type                 | Required | Default                  | Range / notes                                                                     |
| ------------- | -------------------- | -------- | ------------------------ | --------------------------------------------------------------------------------- |
| `color`       | ResourcefulLib color | No       | `#ffffff`                | Number, color string/special name, or RGBA object                                 |
| `food`        | food object          | No       | codec defaults           | See below                                                                         |
| `rarity`      | enum name or ordinal | No       | `COMMON`                 | `COMMON`, `UNCOMMON`, `RARE`, `EPIC` case-insensitively; ordinals `0..3` accepted |
| `honeyBottle` | item identifier      | No       | `minecraft:honey_bottle` | Registered item ID                                                                |
| `tradeData`   | trade object         | No       | `TradeData.DEFAULT`      | Explicit `{}` uses trade-field defaults                                           |

## Food object

| Field            | Type    | Required | Default | Range / notes                      |
| ---------------- | ------- | -------- | ------- | ---------------------------------- |
| `hunger`         | integer | No       | `1`     | No additional codec range supplied |
| `saturation`     | number  | No       | `1.0`   | No additional codec range supplied |
| `canAlwaysEat`   | boolean | No       | `false` |                                    |
| `consumeSeconds` | number  | No       | `2.0`   |                                    |
| `effects`        | array   | No       | `[]`    | Potion-effect entries              |

## Potion-effect entries

| Field      | Type                  | Required | Default | Range / notes                              |
| ---------- | --------------------- | -------- | ------- | ------------------------------------------ |
| `effect`   | mob-effect identifier | **Yes**  | none    | Registered effect ID                       |
| `duration` | integer               | No       | `300`   | No extra codec range supplied              |
| `strength` | integer               | No       | `0`     | No extra codec range supplied              |
| `chance`   | number                | No       | `1.0`   | No range was imposed by the supplied codec |

## Example

```json
{
  "resourcefulbees:bottle/v1": {
    "color": "#f6b83f",
    "food": {
      "hunger": 2,
      "saturation": 1.0,
      "canAlwaysEat": false,
      "consumeSeconds": 2.0,
      "effects": [
        {
          "effect": "minecraft:speed",
          "duration": 300,
          "strength": 0,
          "chance": 1.0
        }
      ]
    },
    "rarity": "COMMON",
    "honeyBottle": "minecraft:honey_bottle"
  }
}
```

Although the serializer is required, its object may be `{}` because all of its nested fields have defaults.
