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

Game crashes when hovering over an item with unknown block tag(s) in the CanDestroy and CanPlaceOn NBT

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Fixed
    • Minecraft 18w19a, Minecraft 18w19b, Minecraft 18w20a, Minecraft 18w20b, Minecraft 18w20c, Minecraft 18w21a, Minecraft 18w21b, Minecraft 18w22a, Minecraft 18w22b
    • Minecraft 18w22c
    • None
    • Confirmed

    Description

      The bug

      If you've got an item with an unknown block tag in the CanDestroy or the CanPlaceOn NBT, the game crashes when hovering over the item.

      How to reproduce

      1. Give yourself an item with either the CanDestroy or CanPlaceOn tag
        /give @s minecraft:diamond_block{CanDestroy:["#minecraft:planks"]}
      2. Disable the vanilla datapack (to make the #minecraft:planks tag unknown)
        /datapack disable vanilla
      3. Hover over the diamond block item → the game will crash
        Description: Rendering screen
        
        java.lang.NullPointerException: Rendering screen
        	at aul.f(SourceFile:725)
        	at aul.a(SourceFile:678)
        	at cjn.a(SourceFile:99)
        	at cjn.a(SourceFile:95)
        	at ckr.a(SourceFile:680)
        	at cki.b(SourceFile:177)
        	at ckr.a(SourceFile:637)
        	at ctg.a(SourceFile:821)
        	at cfv.c(SourceFile:820)
        	at cfv.a(SourceFile:381)
        	at net.minecraft.client.main.Main.main(SourceFile:143)
        

      Attachments

        Activity

          People

            searge [Mojang] Searge (Michael Stoyke)
            AlexMCool Alex³
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              CHK: