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

Game crashes when using an item with a tag in the CanDestroy or CanPlaceOn NBT tag


    • Icon: Bug Bug
    • Resolution: Fixed
    • Minecraft 18w19a
    • Minecraft 17w49b, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w03b, Minecraft 18w05a, Minecraft 18w06a, Minecraft 18w07a, Minecraft 18w09a, Minecraft 18w10c, Minecraft 18w10d, Minecraft 18w11a, Minecraft 18w14b, Minecraft 18w16a
    • Confirmed

      The bug

      An item that has a block tag (like #minecraft:planks) in the CanPlaceOn or CanDestroy NBT tag, can crash the game. This can happen in two ways:

      • By selecting the hotbar slot the item is in, while being in Adventure mode.
      • By opening the inventory and hovering the mouse over the slot the item is in. This can be circumvented by setting the HideFlags NBT tag to 24, which hides the CanPlaceOn/CanDestroy flag.

      The cause of this issue may be that block tags have not been fully implemented for the CanPlaceOn/CanDestroy NBT tag, or that the game does not know how to display the name of a block tag.

      How to reproduce

      1. Run either of the following commands:
        /give @s minecraft:stone{CanPlaceOn:["#minecraft:planks"]}
        /give @s minecraft:stone{CanDestroy:["#minecraft:planks"]}
      2. Perform either of the actions listed above. The game crashes immediately.
      3. Reopen the world. It is possible that the item is still selected and the game crashes immediately, or that the item is not selected. It may also occur that the player data is gone.

      Crash report

      Description: Rendering screen
      g: Non [a-z0-9_.-] character in namespace of location: #minecraft:planks
      	at mx.<init>(SourceFile:33)
      	at mx.<init>(SourceFile:41)
      	at atd.a(SourceFile:143)
      	at ams.a(SourceFile:681)
      	at bqv.a(SourceFile:99)
      	at bqv.a(SourceFile:95)
      	at brz.a(SourceFile:681)
      	at brq.b(SourceFile:176)
      	at brz.a(SourceFile:642)
      	at bzx.a(SourceFile:997)
      	at bne.b(SourceFile:820)
      	at bne.a(SourceFile:380)
      	at net.minecraft.client.main.Main.main(SourceFile:140)

            searge [Mojang] Searge (Michael Stoyke)
            JochCool JochCool
            30 Vote for this issue
            16 Start watching this issue