Java 26.2
/loot
Target Entity
@pDistance
x rotation
y rotation
Team
Name
XP Level
/loot
Generate loot into players, blocks, or the world.
/loot give @p loot minecraft:chests/simple_dungeon
The /loot command is a target and a source bolted together: where the items go, and where they come from. That is why the argument order feels unusual. Pick both halves here and the generator assembles them in the right order.
Loot targets and sources
Java 26.2
@pGenerate loot into players, blocks, or the world.
/loot give @p loot minecraft:chests/simple_dungeon