Skip to content

Obtaining Guidebooks

Vortianski edited this page Nov 28, 2026 · 1 revision

Obtaining Guidebooks

Guided uses the guided:guide_book item for all guidebooks. The guided:book_id data component defines which guidebook the item opens.

Guidebooks can be obtained using commands, crafting recipes, loot tables and advancement rewards. All of these methods use vanilla Minecraft functionality and do not require custom recipe types or programming knowledge.

The following examples are for Minecraft 1.21.1 and use example:book_id as the guidebook identifier.

Parameter Description
guided:guide_book The guidebook item identifier
guided:book_id The data component that stores the guidebook identifier
example:book_id The namespace and identifier of the guidebook created in Getting Started

Resource packs and data packs

Guidebook definitions are stored in resource packs (assets/). Crafting recipes, loot tables and advancements are stored in data packs (data/).

If you are creating a standalone data pack, create a pack.mcmeta file at its root:

{
  "pack": {
    "pack_format": 48,
    "description": "My Guidebook Data Pack"
  }
}

Place the data pack in your world's datapacks folder and use /reload to load it. If you are creating a mod, you can include the assets and data folders in your mod resources instead.

Important

In multiplayer, recipes, loot tables and advancements must be available on the server. Players must also have access to the resource pack containing the guidebook definitions. Giving a guidebook item to a player does not automatically distribute its contents.

Commands

To obtain a guidebook, use the following command:

/give @s guided:guide_book[guided:book_id="example:book_id"]

Replace example:book_id with your own guidebook identifier. You must have permission to use the /give command.

Crafting recipes

Guided supports vanilla shaped and shapeless crafting recipes. Set the guided:book_id component inside the result object to specify which guidebook the recipe produces.

Shaped crafting

Create data/example/recipe/guidebook_shaped.json:

{
  "type": "minecraft:crafting_shaped",
  "pattern": [
    " P ",
    " B "
  ],
  "key": {
    "P": { "item": "minecraft:paper" },
    "B": { "item": "minecraft:book" }
  },
  "result": {
    "id": "guided:guide_book",
    "count": 1,
    "components": {
      "guided:book_id": "example:book_id"
    }
  }
}

This recipe uses a piece of paper above a book.

Shapeless crafting

Create data/example/recipe/guidebook_shapeless.json:

{
  "type": "minecraft:crafting_shapeless",
  "ingredients": [
    { "item": "minecraft:book" },
    { "item": "minecraft:feather" }
  ],
  "result": {
    "id": "guided:guide_book",
    "count": 1,
    "components": {
      "guided:book_id": "example:book_id"
    }
  }
}

This recipe uses a book and a feather in any order. Both recipes are independent examples; you can use either or both.

Loot tables

Guidebooks can be included in loot tables using the vanilla minecraft:set_components loot function.

Create data/example/loot_table/guidebook.json:

{
  "type": "minecraft:generic",
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "guided:guide_book",
          "functions": [
            {
              "function": "minecraft:set_components",
              "components": {
                "guided:book_id": "example:book_id"
              }
            }
          ]
        }
      ]
    }
  ]
}

This loot table produces one guidebook. You can reference it from other loot tables or use the same item entry in your own chest loot tables.

To test the loot table, use:

/loot give @s loot example:guidebook

Advancement rewards

Advancements can reward players with guidebooks by referencing a loot table.

Create data/example/advancement/guidebook_reward.json:

{
  "criteria": {
    "obtain_diamond": {
      "trigger": "minecraft:inventory_changed",
      "conditions": {
        "items": [
          { "items": "minecraft:diamond" }
        ]
      }
    }
  },
  "rewards": {
    "loot": ["example:guidebook"]
  }
}

This advancement uses the loot table from the previous section to give a guidebook when the player obtains a diamond. Since the advancement does not contain a display object, it does not appear in the advancement screen.

Giving guidebooks to new players

If you want every player to receive a guidebook automatically, use an advancement with the minecraft:tick trigger.

Create data/example/advancement/starter_guidebook.json:

{
  "criteria": {
    "join": {
      "trigger": "minecraft:tick"
    }
  },
  "rewards": {
    "loot": ["example:guidebook"]
  }
}

This advancement is completed automatically on a player tick and grants the guidebook once per player. It also applies to existing players who have not completed the advancement when the data pack is installed.

Note

The guidebook will not be given again when a player dies or loses it. Revoking the advancement allows it to trigger again. If you use both advancement examples, players can receive a guidebook from each advancement.

Data pack structure

If you use all the examples above, your data pack should have the following structure:

My Guidebook Data Pack/
├── pack.mcmeta
└── data/
    └── example/
        ├── recipe/
        │   ├── guidebook_shaped.json
        │   └── guidebook_shapeless.json
        ├── loot_table/
        │   └── guidebook.json
        └── advancement/
            ├── guidebook_reward.json
            └── starter_guidebook.json

Important

Minecraft 1.21.1 uses singular folder names: recipe, loot_table and advancement.

For more information about defining the guidebook itself, see Book Definition. To customize the name of the guidebook item, see Localization.

Clone this wiki locally