--- a/net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceWithLootingCondition.java
+++ b/net/minecraft/world/level/storage/loot/predicates/LootItemRandomChanceWithLootingCondition.java
@@ -13,13 +13,10 @@
 import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
 
 public record LootItemRandomChanceWithLootingCondition(float percent, float lootingMultiplier) implements LootItemCondition {
-    public static final MapCodec<LootItemRandomChanceWithLootingCondition> CODEC = RecordCodecBuilder.mapCodec(
-        instance -> instance.group(
-                    Codec.FLOAT.fieldOf("chance").forGetter(LootItemRandomChanceWithLootingCondition::percent),
-                    Codec.FLOAT.fieldOf("looting_multiplier").forGetter(LootItemRandomChanceWithLootingCondition::lootingMultiplier)
-                )
-                .apply(instance, LootItemRandomChanceWithLootingCondition::new)
-    );
+
+    public static final MapCodec<LootItemRandomChanceWithLootingCondition> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
+        return instance.group(Codec.FLOAT.fieldOf("chance").forGetter(LootItemRandomChanceWithLootingCondition::percent), Codec.FLOAT.fieldOf("looting_multiplier").forGetter(LootItemRandomChanceWithLootingCondition::lootingMultiplier)).apply(instance, LootItemRandomChanceWithLootingCondition::new);
+    });
 
     @Override
     public LootItemConditionType getType() {
@@ -31,18 +28,25 @@
         return ImmutableSet.of(LootContextParams.KILLER_ENTITY);
     }
 
-    @Override
-    public boolean test(LootContext lootContext) {
-        Entity entity = lootContext.getParamOrNull(LootContextParams.KILLER_ENTITY);
+    public boolean test(LootContext loottableinfo) {
+        Entity entity = (Entity) loottableinfo.getParamOrNull(LootContextParams.KILLER_ENTITY);
         int i = 0;
+
         if (entity instanceof LivingEntity) {
-            i = EnchantmentHelper.getMobLooting((LivingEntity)entity);
+            i = EnchantmentHelper.getMobLooting((LivingEntity) entity);
+        }
+        // CraftBukkit start - only use lootingModifier if set by Bukkit
+        if (loottableinfo.hasParam(LootContextParams.LOOTING_MOD)) {
+            i = loottableinfo.getParamOrNull(LootContextParams.LOOTING_MOD);
         }
+        // CraftBukkit end
 
-        return lootContext.getRandom().nextFloat() < this.percent + (float)i * this.lootingMultiplier;
+        return loottableinfo.getRandom().nextFloat() < this.percent + (float) i * this.lootingMultiplier;
     }
 
     public static LootItemCondition.Builder randomChanceAndLootingBoost(float chance, float lootingMultiplier) {
-        return () -> new LootItemRandomChanceWithLootingCondition(chance, lootingMultiplier);
+        return () -> {
+            return new LootItemRandomChanceWithLootingCondition(chance, lootingMultiplier);
+        };
     }
 }
