Minecraft – /loot giving “An unexpected error occurred trying to execute that command”

minecraft-commandsminecraft-java-edition

I'm attempting to use /loot to give myself fishing loot, which should be fairly easy. I'm using this command;

/loot give EarthToAccess fish minecraft:gameplay/fishing/treasure -78 65 -212 mainhand

…however, it throws me the error An unexpected error occurred trying to execute that command. I tried to remove mainhand since the argument for it is optional anyway, but it still returns the same error. As far as I can tell, the syntax is correct; I'm supposedly giving myself the treasure loot table from the coordinates listed. Is there some bug with /loot give right now?

Best Answer

This worked fine for me:

/loot give [yourPlayerName] fish minecraft:gameplay/fishing/treasure ~ ~ ~

Using ~ ~ ~ for the location argument will give it to your current location.

Could any mods you're using be causing a problem?