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

Block loot tables ignore Luck despite entity context being provided

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.4, 23w18a, 1.20 Pre-release 1, 1.20 Pre-release 2, 1.20 Pre-release 3, 1.20 Pre-release 5, 1.20 Pre-release 6, 1.20, 1.20.1, 23w33a, 1.20.2, 23w40a, 1.20.3, 1.20.4, 24w13a, 24w14a, 1.20.5 Pre-Release 1, 1.20.5 Pre-Release 2, 1.20.5 Pre-Release 3, 1.20.5 Pre-Release 4, 1.20.5 Release Candidate 2, 1.20.5 Release Candidate 3, 1.20.5, 1.20.6 Release Candidate 1, 1.20.6
    • None
    • Confirmed
    • Data Packs
    • Low
    • Platform

      Loot tables of type minecraft:block are unaffected by the Luck attribute despite evidently providing the "this" entity loot context. As such, the bonus_rolls and quality tags are completely ignored. This is different from chest and archaeology loot tables which handle Luck correctly.

      Steps to reproduce

      1. Download the attached data pack “block_luck_test.zip” and add it to either a new or an existing world. This data pack replaces the loot table minecraft:blocks/dirt and is set up the following way:
        • Dirt blocks always drop a diamond. This is just to test whether the loot table has been parsed and applied correctly at all.
        • Dirt blocks drop a piece of coal if the mining player is currently sneaking. This is to test whether the loot table has access to the entity context.
        • Dirt blocks (theoretically) drop an iron ingot if the mining player’s Luck attribute is at least 1. This is to test whether the loot table respects Luck.
      2. Place a bunch of dirt blocks and switch to Survival mode if not already.
      3. Mine some dirt blocks without any potion effects active and without sneaking.
      4. Mine some dirt blocks without any potion effects active, but while holding down the sneak key.
      5. Give yourself Luck (either through the /effect command or by drinking a Potion of Luck from the Creative inventory) and mine some dirt blocks again. Sneaking is irrelevant for this third test.

      Expected results

      • Each dirt block mined drops a diamond regardless of conditions.
      • While the player is sneaking, each dirt block mined additionally drops a piece of coal.
      • After the Luck effect has been applied, each dirt block mined additionally drops an iron ingot.

      Observed results

      • Each dirt block mined drops a diamond regardless of conditions.
      • While the player is sneaking, each dirt block mined additionally drops a piece of coal.
      • After the Luck effect has been applied, the loot from mined dirt blocks does not change.

            Unassigned Unassigned
            charlottebuff Charlotte Buff
            Votes:
            5 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: