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

Setblock command run by book in lectern to clear inventory run in commandblock causes ghost items

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.15.2
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      Windows 10, openjdk version 1.8.0_212
    • Confirmation Status:
      Unconfirmed
    • Category:
      (Unassigned)

      Description

      When calling setblock from a book (in a lectern or in hand), the block will be set. If a commandblock executing the clear command is being executed by that, ghost items are created only if the book was in a lactern, but not otherwise.

       

      How to reproduce

      Preparation

      Execute these two commands (if necessary, using a commandblock) to get the lectern and the command block:

      Lectern:

      /give @p lectern{BlockStateTag:{has_book:"true"},BlockEntityTag:{Book:{id:written_book,Count:1b,tag:{author:"Summoner",title:"Summoned Book",pages:['{"text":"Set Redstone Block","clickEvent":{"action":"run_command","value":"/setblock ~3 ~ ~ redstone_block"}}']}}}}
      

      Command-Block:

      /give @p command_block{BlockEntityTag:{Command:"clear @p"}}
      

      Stand still. Place the commandblock to the east so that there are 3 spaces between you and the commandblock. (~4 ~ ~) Place the lectern to the east right next to you. (~1 ~ ~)

      Execution

      Click on the lectern, click the text, the redstoneblock will appear, the commandblock's output will tell you "Removed 2 items from player" and you'll have ghost-items in your toolbar.
      Re-Setup.
      Take the book from the lectern, open it while in your toolbar, click the text, the redstoneblock will appear, the commandblock's output will tell you "Removed 2 items from player" and your items will be gone without leaving ghost-items.

       

      This bug seems to be in correlation with MC-154094.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ChaosNe0 ChaosNe0
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: