Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-129006

Game crashes when loot table entry type is unknown

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.17.20.22 Beta
    • 1.17.10.20 Beta
    • None
    • Confirmed
    • Windows
    • 541814

      The bug

      When the type inside a loot table entry is not one bedrock understands, the game instantly crashes while attempting to parse it.

      How to reproduce

      1. Download the attached world
      2. Kill the pig
      Your game crashes

      Expected result Content log warning.

      For convenience here is the exact loot table used

      {
         "pools": [
            {
               "rolls": 1.0,
               "entries": [
                  {
                     "type": "test",
                     "name": "minecraft:diamond_ore"
                  }
               ]
            }
         ]
      }
      

      Notes

      I noticed this when attempting to use a Java loot table in Bedrock. The reason is that Java uses "type":"minecraft:item" for its entries, where Bedrock just uses "type":"item".

      This means that even if this is fixed, Bedrock should be updated to support namespaced entry types.

            tryashtar [Mod] tryashtar
            Votes:
            4 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: