mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-08 11:24:11 +01:00
SPIGOT-6925: Add minecraft:match_tool in LootContext
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
8216743085
commit
22136f3a05
1 changed files with 1 additions and 0 deletions
|
@ -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
|
// 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.DAMAGE_SOURCE, DamageSource.playerAttack(nmsKiller));
|
||||||
setMaybe(builder, LootContextParameters.LAST_DAMAGE_PLAYER, nmsKiller); // SPIGOT-5603 - Set minecraft:killed_by_player
|
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
|
// SPIGOT-5603 - Use LootContext#lootingModifier
|
||||||
|
|
Loading…
Reference in a new issue