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

'random_chance_with_enchanted_bonus' always uses 'unenchanted_chance' outside of loot tables

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.21 Pre-Release 1, 1.21 Pre-Release 2, 1.21 Pre-Release 3, 1.21 Release Candidate 1, 1.21
    • Windows 10, Java 21.0.3
    • Community Consensus
    • Enchantments
    • Low
    • Platform

      Tinkered around a bit right after the pre-release dropped and discovered that the newly added predicate isn't fully functional outside of loot tables.

      Steps to reproduce

      1. Put the following command into a repeating always active Command Block:

       
      execute as @p if predicate {"condition":"minecraft:random_chance_with_enchanted_bonus","enchanted_chance":{"type":"minecraft:linear","base":0.33333334,"per_level_above_first":0.33333333},"enchantment":"minecraft:looting","unenchanted_chance":0} run say passed!
      

      2. Give yourself 3 swords - each with a different level of Looting.
      3. First, hold nothing. Then switch to the enchanted swords.
      4. Notice how the amount of chat messages saying 'passed!' doesn't increase despite the fact that the predicate should have a 100% chance of passing with Looting III. 

            Unassigned Unassigned
            kohara kohara
            Votes:
            7 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              CHK: