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

Luck attribute (and potion) does not work on /loot command

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.17.1
    • None
    • Windows 10 Java
    • Unconfirmed
    • (Unassigned)

      To reproduce:

      Create a test loot table:

      {
        "pools": [
          {
            "rolls": 1,
            "bonus_rolls": 5,
            "entries": [
              {
                "type": "item",
                "weight": 1,
                "quality": 100,
                "name": "minecraft:rotten_flesh",
                "functions": [
                  {
                    "function": "set_count",
                    "count": 1
                  }
                ]
              },
              {
                "type": "empty",
                "weight": 100
              }
            ]
          }
        ]
      }
      

      Then run:
      /attribute @p minecraft:generic.luck base set 10
      /setblock ~ ~ ~ chest

      {LootTable:"test:test"}

      replace
      /summon husk ~ ~ ~

      {DeathLootTable:"test:test"}

      /loot give @p loot foss:test
      /loot give @p kill @e[type=husk,limit=1]
      /loot give @p fish foss:test ~ ~ ~

      Real Output:
      The loot command for looting will give you 0 rotten flesh.
      The loot command for killing the husk will give you 0 rotten flesh.
      The loot command for fishing will also give you 0 rotten flesh.
      The chest from setblock will be full of rotten flesh, about 27 of it (for running out of slots).
      Actually killing the husk will give you about 50 rotten flesh.

      Expected output:
      All 3 commands should give about 50 rotten flesh.
      Actually opening chests and killing mobs works as expected.

      The loot table type does not matter. Has been tested with unset, entity and fishing, and all them behave identically via commands.

      Really troll game behavior by Mojang as usual, maybe this can get fixed before 2025 for mapmakers. Cheers.

            Unassigned Unassigned
            TBlazeWarriorT Brian Santos da Fonseca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: