3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

SPIGOT-5249: Do not add data to empty loot table

Dieser Commit ist enthalten in:
md_5 2019-08-09 20:19:06 +10:00
Ursprung 54f4e7f958
Commit 660b6d19a7

Datei anzeigen

@ -74,6 +74,7 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
WorldServer handle = ((CraftWorld) loc.getWorld()).getHandle();
LootTableInfo.Builder builder = new LootTableInfo.Builder(handle);
if (getHandle() != LootTable.a) { // PAIL - empty
// builder.luck(context.getLuck());
if (context.getLootedEntity() != null) {
@ -89,6 +90,7 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
// If there is a player killer, damage source should reflect that in case loot tables use that information
builder.set(LootContextParameters.DAMAGE_SOURCE, DamageSource.playerAttack(nmsKiller));
}
}
return builder.build(getHandle().getLootContextParameterSet());
}