[SPIGOT-6121] LootContext is missing required parameters: [<parameter minecraft:origin>] Created: 01/Sep/20  Updated: 01/Sep/20  Resolved: 01/Sep/20

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Aelteria Assignee: Unassigned
Resolution: Invalid Votes: 0
Labels: loottable

Version: Paper version git-Paper-161 (MC: 1.16.2) (Implementing API version 1.16.2-R0.1-SNAPSHOT)
Plugin: My own plugin, not publicly posted anywhere.
Guidelines Read: Yes

 Description   

The version I'm using is Paper, however it is a Spigot problem and likely will just be reported as "will wait for Spigot to fix", so I'd rather report it here.

In fact, there was a thread posted about this a long while ago.
https://www.spigotmc.org/threads/loot-context-is-impossible-to-be-accepted-by-minecraft.396757/

LootTable#fillInventory and LootTable#populateLoot cannot work because they require LootContext, and LootContext cannot work because it requires a parameter that isn't being passed to NMS properly.

This is reproduced using LootTable#fillInventory normally.

Caused by: java.lang.IllegalArgumentException: Missing required parameters: [<parameter minecraft:origin>] at net.minecraft.server.v1_16_R2.LootTableInfo$Builder.build(SourceFile:208) ~[patched_1.16.2.jar:git-Paper-161] at org.bukkit.craftbukkit.v1_16_R2.CraftLootTable.convertContext(CraftLootTable.java:114) ~[patched_1.16.2.jar:git-Paper-161] at org.bukkit.craftbukkit.v1_16_R2.CraftLootTable.populateLoot(CraftLootTable.java:44) ~[patched_1.16.2.jar:git-Paper-161]


Generated at Fri Mar 14 15:03:41 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.