From 22136f3a05a054ed0cc0ffb08359e513e93ea77f Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Mon, 21 Feb 2022 10:52:08 +1100 Subject: [PATCH] SPIGOT-6925: Add minecraft:match_tool in LootContext By: Doc --- .../src/main/java/org/bukkit/craftbukkit/CraftLootTable.java | 1 + 1 file changed, 1 insertion(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java index 86868f8fd8..93dc8d5e9b 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java @@ -95,6 +95,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 setMaybe(builder, LootContextParameters.DAMAGE_SOURCE, DamageSource.playerAttack(nmsKiller)); setMaybe(builder, LootContextParameters.LAST_DAMAGE_PLAYER, nmsKiller); // SPIGOT-5603 - Set minecraft:killed_by_player + setMaybe(builder, LootContextParameters.TOOL, nmsKiller.getUseItem()); // SPIGOT-6925 - Set minecraft:match_tool } // SPIGOT-5603 - Use LootContext#lootingModifier