mojira.dev
MC-271870

random_chance_with_looting function base value is for enchantment level 1

The previous random_chance_with_looting function had a base chance, and a per_level bonus to that chance.
The new random_chance_with_enchanted_bonus for some reason has a per_level_above_first bonus instead, which as its name implies is only effective at levels 2 and above. In turn, all uses of it were given updated base chances. As a result, the player now effectively always has looting 1 for rare drops, and only looting 2 and above can increase this.

Example loot table
Expected behavior: item never drops without looting, always drops with looting 1 or higher
Actual behavior: item never drops without looting 2 or higher

{
   "type": "minecraft:entity",
   "pools": [
      {
         "rolls": 1.0,
         "bonus_rolls": 0.0,
         "entries": [
            {
               "type": "minecraft:item",
               "name": "minecraft:diamond"
            }
         ],
         "conditions": [
            {
               "condition": "minecraft:random_chance_with_enchanted_bonus",
               "chance": {
                  "type": "minecraft:linear",
                  "base": 0.0,
                  "per_level_above_first": 1.0
               },
               "enchantment": "minecraft:looting"
            }
         ]
      }
   ]
}
{
   "type": "minecraft:entity",
   "pools": [
      {
         "rolls": 1.0,
         "bonus_rolls": 0.0,
         "entries": [
            {
               "type": "minecraft:item",
               "name": "minecraft:diamond"
            }
         ],
         "conditions": [
            {
               "condition": "minecraft:random_chance_with_enchanted_bonus",
               "chance": {
                  "type": "minecraft:linear",
                  "base": 0.0,
                  "per_level_above_first": 1.0
               },
               "enchantment": "minecraft:looting"
            }
         ]
      }
   ]
}

Comments 2

Can indeed confirm after testing.

On second thought and with some more testing, I think this report as written is wrong.
With no looting, you get base chance minus per_level_above_first
With looting I, you get base chance
With looting II, you get base chance plus per_level_above_first
This is a bit confusing, but the effect seems to be the same as it was before.

tryashtar

Tommy Wallberg

Community Consensus

Platform

Important

Enchantments, Loot tables

24w19b

1.21 Pre-Release 1

Retrieved