@@ -1,14 +1,14 @@
|
||||
--- a/net/minecraft/server/LootItemConditionRandomChanceWithLooting.java
|
||||
+++ b/net/minecraft/server/LootItemConditionRandomChanceWithLooting.java
|
||||
@@ -21,6 +21,11 @@
|
||||
if (loottableinfo.c() instanceof EntityLiving) {
|
||||
i = EnchantmentManager.g((EntityLiving) loottableinfo.c());
|
||||
@@ -28,6 +28,11 @@
|
||||
if (entity instanceof EntityLiving) {
|
||||
i = EnchantmentManager.g((EntityLiving) entity);
|
||||
}
|
||||
+ // CraftBukkit start - only use lootingModifier if set by Bukkit
|
||||
+ if (loottableinfo.lootingMod > org.bukkit.loot.LootContext.DEFAULT_LOOT_MODIFIER) {
|
||||
+ i = loottableinfo.lootingMod;
|
||||
+ if (loottableinfo.hasContextParameter(LootContextParameters.LOOTING_MOD)) {
|
||||
+ i = loottableinfo.getContextParameter(LootContextParameters.LOOTING_MOD);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
return random.nextFloat() < this.a + (float) i * this.b;
|
||||
return loottableinfo.b().nextFloat() < this.a + (float) i * this.b;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user