Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 20:40:08 +01:00
24 Zeilen
1.2 KiB
Diff
24 Zeilen
1.2 KiB
Diff
|
--- 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());
|
||
|
}
|
||
|
+ // CraftBukkit start - only use lootingModifier if set by Bukkit
|
||
|
+ if (loottableinfo.lootingMod > org.bukkit.loot.LootContext.DEFAULT_LOOT_MODIFIER) {
|
||
|
+ i = loottableinfo.lootingMod;
|
||
|
+ }
|
||
|
+ // CraftBukkit end
|
||
|
|
||
|
return random.nextFloat() < this.a + (float) i * this.b;
|
||
|
}
|
||
|
@@ -40,7 +45,7 @@
|
||
|
return new LootItemConditionRandomChanceWithLooting(ChatDeserializer.l(jsonobject, "chance"), ChatDeserializer.l(jsonobject, "looting_multiplier"));
|
||
|
}
|
||
|
|
||
|
- public LootItemCondition b(JsonObject jsonobject, JsonDeserializationContext jsondeserializationcontext) {
|
||
|
+ public LootItemConditionRandomChanceWithLooting b(JsonObject jsonobject, JsonDeserializationContext jsondeserializationcontext) { // CraftBukkit - decompile error
|
||
|
return this.a(jsonobject, jsondeserializationcontext);
|
||
|
}
|
||
|
}
|