mojira.dev
MC-173664

Using a knowledge book doesn't give advancements.

What I expected: Using a knowledge book will award the players advancements with the criteria consuming a knowledge book
What actually happened: Using a knowledge book does NOT award the players those advancements, although your score of using the book does go up.

How to reproduce:
1. Do /scoreboard objectives add useBook minecraft.used:minecraft.knowledge_book
2. Do /scoreboard objectives setdisplay sidebar useBook
3. Download the datapack below containing the advancement and reload
4. Do /give @s knowledge_book{Recipes:[]}
5. Use the book
6. See that the score goes up but you don't get xp

Advancement JSON:

{
    "display": {
        "title": {
            "text": "Advancement"
        },
        "description": {
            "text": "Description"
        },
        "icon": {
            "item": "minecraft:stone"
        },
        "frame": "task",
        "show_toast": true,
        "announce_to_chat": true,
        "hidden": false
    },
    "criteria": {
        "use_book": {
            "trigger": "minecraft:consume_item",
            "conditions": {
                "item": {
                    "item": "minecraft:knowledge_book"
                }
            }
        }
    },
    "requirements": [
        [
            "randomize_kit"
        ]
    ],
    "rewards": {
        "experience": 10000
    },
    "parent": "bug:hidden/root"
}

Linked issues

Attachments

Comments 4

Remember to extract the .zip file when putting it in the “datapacks” folder

Oops, I made a mistake. Change the "randomize_kit" in the requirements to be "use_book"

Can you please check if this applies to the latest 1.16 development snapshot, too?

Likely intended (see @unknown's comment here).

Nguyen Thanh

(Unassigned)

Unconfirmed

(Unassigned)

1.15.2

Retrieved