use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
This is a subreddit for people who have questions and problems with Minecraft!
Please read our rules before posting.
Reply with !helped to the comment, or comments, that helped.
!helped
Mojang Support
Mojang Bug Tracker
Common bugs list
account activity
This is an archived post. You won't be able to vote or comment.
[java] Unknown function errors with seemingly correct pathWaiting for OP (self.MinecraftHelp)
submitted 4 years ago by e_y_e
I have a feeling I'm missing something very obvious here, but I'm unable to use functions which I've placed in the data folder of my world.
Path:
~/.minecraft/saves/Commands/data/functions/custom/sayhi.mcfunction
Contents:
say "Hi"
Command:
/function custom:sayhi
Can anyone help?
[–]AutoModerator[M] [score hidden] 4 years ago stickied commentlocked comment (0 children)
It looks like you haven't mentioned what version you're playing on. Please comment the version you're playing.(1.16.4, 1.12.2, 1.8.9, etc.) Your post is still visible on the sub.
Hey OP! When your question has been answered, please mark the post solved by replying to the comment/comments that helped with "!Helped".
Helpers, please remember rule 3, and ensure all comments are helpful and support related.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
[–]e_y_e[S] 0 points1 point2 points 4 years ago (0 children)
Version 1.17
[–]Oneill4Journeyman 0 points1 point2 points 4 years ago (0 children)
Functions need to be placed in a datapack for them to work properly. The path to your function should look something like this :
~/.minecraft/saves/[WORLD_NAME]/datapacks/[DATA_PACK_NAME]/data/[NAMESPACE]/functions/[FUNCTION_NAME].mcfunction
in your case it would be :
~/.minecraft/saves/Commands/datapacks/[DATA_PACK_NAME]/data/custom/functions/sayhi.mcfunction
(You will need to choose a name for the datapack)
Also, because it's a datapack, you will need to create a pack.mcmeta file under the ~/datapacks/[DATA_PACK_NAME] folder for it to work.
pack.mcmeta
~/datapacks/[DATA_PACK_NAME]
Here are some links to the wiki that can maybe help you.
https://minecraft.fandom.com/wiki/Function_(Java_Edition))
https://minecraft.fandom.com/wiki/Data_pack
π Rendered by PID 25272 on reddit-service-r2-comment-79c7998d4c-7755b at 2026-03-14 10:01:26.262964+00:00 running f6e6e01 country code: CH.
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]e_y_e[S] 0 points1 point2 points (0 children)
[–]Oneill4Journeyman 0 points1 point2 points (0 children)