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

Weight on alternatives/sequence/group loot table entry is ignored

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.15.2, 20w18a, 20w20b, 20w22a, 1.16.3
    • Fix Version/s: None
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Loot tables

      Description

      In this bug report I will only use "alternatives", but know that it applies to all three.

      The bug

      A loot table entry of type "alternatives", "group", or "sequence" ignores the weight. It acts as if it has the default weight of 1.

      Stranger, if you give the children of the alternatives entry a weight, it acts as if the weight was given to the alternatives entry. So it appears as if the children of alternatives are processed before a random entry is chosen in the parent entry.

      How to reproduce

      1. Download and install the attached data pack
      2. Run "/loot give @s loot mc-177500:a" a few times
      3. Notice that you get about as many diamonds as emeralds
      4. Run "/loot give @s loot mc-177500:b" a few times
      5. Notice that you get about 9 diamonds for each emerald

      Examples (simplified)

      mc-177500:a mc-177500:b
      "entries": [
        {
          "type": "alternatives",
          "weight": 9,
          "children": [
            {
              "type": "item",
              "name": "diamond"
            }
          ]
        },
        {
          "type": "item",
          "name": "emerald"
        }
      ]
      
      "entries": [
        {
          "type": "alternatives",
          "children": [
            {
              "type": "item",
              "name": "diamond",
              "weight": 9
            }
          ]
        },
        {
          "type": "item",
          "name": "emerald"
        }
      ]
      

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            Misoloo [Helper] Misode
            Votes:
            11 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              CHK: