Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-20 21:40:06 +01:00
18 Zeilen
684 B
Diff
18 Zeilen
684 B
Diff
|
--- a/net/minecraft/server/LootEnchantFunction.java
|
||
|
+++ b/net/minecraft/server/LootEnchantFunction.java
|
||
|
@@ -21,8 +21,13 @@
|
||
|
|
||
|
if (entity instanceof EntityLiving) {
|
||
|
int i = EnchantmentManager.g((EntityLiving) entity);
|
||
|
+ // CraftBukkit start - use lootingModifier if set by plugin
|
||
|
+ if (loottableinfo.lootingMod > org.bukkit.loot.LootContext.DEFAULT_LOOT_MODIFIER) {
|
||
|
+ i = loottableinfo.lootingMod;
|
||
|
+ }
|
||
|
+ // CraftBukkit end
|
||
|
|
||
|
- if (i == 0) {
|
||
|
+ if (i <= 0) { // CraftBukkit - account for possible negative looting values from Bukkit
|
||
|
return itemstack;
|
||
|
}
|
||
|
|