3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 20:40:07 +01:00
Paper/nms-patches/LootItemConditionRandomChanceWithLooting.patch
2020-06-25 10:00:00 +10:00

15 Zeilen
656 B
Diff

--- a/net/minecraft/server/LootItemConditionRandomChanceWithLooting.java
+++ b/net/minecraft/server/LootItemConditionRandomChanceWithLooting.java
@@ -33,6 +33,11 @@
if (entity instanceof EntityLiving) {
i = EnchantmentManager.g((EntityLiving) entity);
}
+ // CraftBukkit start - only use lootingModifier if set by Bukkit
+ if (loottableinfo.hasContextParameter(LootContextParameters.LOOTING_MOD)) {
+ i = loottableinfo.getContextParameter(LootContextParameters.LOOTING_MOD);
+ }
+ // CraftBukkit end
return loottableinfo.a().nextFloat() < this.a + (float) i * this.b;
}