Paper/nms-patches/LootItemConditionRandomChanceWithLooting.patch

15 lines
656 B
Diff
Raw Normal View History

2018-08-12 10:39:51 +02:00
--- a/net/minecraft/server/LootItemConditionRandomChanceWithLooting.java
+++ b/net/minecraft/server/LootItemConditionRandomChanceWithLooting.java
2019-04-23 04:00:00 +02:00
@@ -28,6 +28,11 @@
if (entity instanceof EntityLiving) {
i = EnchantmentManager.g((EntityLiving) entity);
2018-08-12 10:39:51 +02:00
}
+ // CraftBukkit start - only use lootingModifier if set by Bukkit
2019-04-23 04:00:00 +02:00
+ if (loottableinfo.hasContextParameter(LootContextParameters.LOOTING_MOD)) {
+ i = loottableinfo.getContextParameter(LootContextParameters.LOOTING_MOD);
2018-08-12 10:39:51 +02:00
+ }
+ // CraftBukkit end
2019-04-23 04:00:00 +02:00
return loottableinfo.b().nextFloat() < this.a + (float) i * this.b;
2018-08-12 10:39:51 +02:00
}