3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-23 23:00:08 +01:00
Paper/nms-patches/LootItemConditionRandomChanceWithLooting.patch

15 Zeilen
656 B
Diff

2018-08-12 10:39:51 +02:00
--- a/net/minecraft/server/LootItemConditionRandomChanceWithLooting.java
+++ b/net/minecraft/server/LootItemConditionRandomChanceWithLooting.java
2020-06-25 02:00:00 +02:00
@@ -33,6 +33,11 @@
2019-04-23 04:00:00 +02:00
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-12-10 23:00:00 +01:00
return loottableinfo.a().nextFloat() < this.a + (float) i * this.b;
2018-08-12 10:39:51 +02:00
}