@@ -1,12 +1,12 @@
|
||||
--- a/net/minecraft/server/LootEnchantFunction.java
|
||||
+++ b/net/minecraft/server/LootEnchantFunction.java
|
||||
@@ -21,8 +21,13 @@
|
||||
@@ -32,8 +32,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;
|
||||
+ if (loottableinfo.hasContextParameter(LootContextParameters.LOOTING_MOD)) {
|
||||
+ i = loottableinfo.getContextParameter(LootContextParameters.LOOTING_MOD);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
@@ -15,3 +15,12 @@
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@@ -59,7 +64,7 @@
|
||||
}
|
||||
|
||||
public void a(JsonObject jsonobject, LootEnchantFunction lootenchantfunction, JsonSerializationContext jsonserializationcontext) {
|
||||
- super.a(jsonobject, (LootItemFunctionConditional) lootenchantfunction, jsonserializationcontext);
|
||||
+ super.a(jsonobject, lootenchantfunction, jsonserializationcontext); // CraftBukkit - decompile error
|
||||
jsonobject.add("count", jsonserializationcontext.serialize(lootenchantfunction.a));
|
||||
if (lootenchantfunction.b()) {
|
||||
jsonobject.add("limit", jsonserializationcontext.serialize(lootenchantfunction.c));
|
||||
|
||||
Reference in New Issue
Block a user