Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-225672

Replaceitem does not work when player is looking in the book in lectern

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • None
    • 1.16.5
    • None
    • Creative
    • Unconfirmed
    • (Unassigned)

      The bug

      When you are looking in the opened book in lectern and you replace your armor with /replaceitem command, you cannot see that replaced armor in your inventory and on your character also. While other players in multiplayer can see the armor as changed without any problem.

       

      How to reproduce:

      1. Create a book with text with click action "run command". The command should replace your blank armor slot with a specific armor item. (e.g. /replaceitem entity @s armor.chest minecraft:leather_chestplate)
      2. Insert the book in the lectern.
      3. Then oped the book in the lectern and click the text.
      4. Your blank armor slot will not be replaced by the armor item.

      When you use the only book, without inserting it into the lectern, it will work without any problem.

       

      Command for book can look like this:

      /give @p written_book{pages:['{"text":"Give me armor","clickEvent":{"action":"run_command","value":"/replaceitem entity @s armor.chest minecraft:leather_chestplate"}}'],title:Book,author:""}

            Unassigned Unassigned
            MartinK Martin Kubeš
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: