3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-29 17:40:09 +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
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
}