So ive been working with command blocks for a very long time now, and i wanted to start doing datapacks, as they are more advanced. ive seen some websites that help with json files (predicates, recipes) but none for all the other files or how to create it as a whole. (although just using websites wouldnt help anyways, im trying to learn) so id be happy if someone will be willing to try and teahc me the basics!
#trying to create a data pack
1 messages · Page 1 of 1 (latest)
i did everything it told me and it doesnt work tho
does it just not show up in the datapack selection screen, or...?
no, all the files are there and the /function doesnt work
imma try it in 1.21.11 tho just incase
What version would you want your datapack to be for?
if your datapack version is 1.21 or above then change the folder names without s except tags
sorry im delayed, 26.1
yeah i kinda read everything
check logs
wdym?
ill try
so it looks like its working, just doesnt do anything when i run the function. although the logs say the function ran succesfuly
your function is empty
nope, theres
title @s title "Hello World!"
give @s diamond
there
yep
and i checked, the commands are right (even tho i was sure they were right, just incase i ran them in the chat and theyre right)
then it works
If there's any one thing I'd recommend when developing datapacks, it's: Get Visual Studio Code (free) and install the DatapackHelperPlus plug-in for it (also free).
But I can also help, if you're willing to send the current copy of your datapack.
but it doesnt...
sorry, i was sleeping. and yes, ill send
whats the problem
Yeah I don't understand, the only thing you seem to have here is a function that will only do anything when you run it in chat. What exactly isn't working as you expect?
yeah i know i need to run /function in chat, and im asking exactly what you are asking. i have no idea why it wouldnt work
Does your datapack show when you list the datapacks with /datapack list?
yeah, but it just doesnt like work when i do /function (it doesnt give a diamond sword)
it does auto complete your command?
Have you checked the logs or tried it with /debug?
checked the logs, and everything was ok. i didnt try debug, and yes it autocompletes my command
wow its really hard to not answer you delayed cause you dont reply
i mean like not reply so that it pings
I can reply but some people take offense or have issues with it when I do this a lot.
Honestly I can't think of why the command doesn't work, perhaps it wants a fully namespaced item id but that would not be vanilla behavior.
I would expect logs to tell you something is wrong with the function if it exists however
so i tried /debug and it says 0 traaced commands, i would guess its not something good?
It means you didn't save your file
Most likely
The game has an empty mcfunction
Save it, make sure it is the file in your world folder or copy it again
And reload
thats what i thought when it didnt work, but when i enter to "edit" and check the datapacks folder, then go to the .mcfunction, it is full.
ill try some other things, but i dont thing it is a problem with files, im pretty sure something is incompatible
even though i am in vanilla
It has to be, the debugger does not lie about what the game has found in your function
Or you have commands starting with a #
The debugger can trace the entire command, even if it does recursion etc.
yeah, i even tried a recipe just to see if its something with the commands, and it doesnt work as well (i put it in a recipe file in the "example" in the "data" file)
ill try researching a bit more
You are saving your files and reloading your world with reload after each change?
yeah, im logging out and back in and then do reload
Recipes don't show by themselves, crafting them once adds them to your book, but they don't appear by default.
can you put say hi
What OS are you on? Do you know how to run a tree command from the root folder of your datapack?
and see if the message pops up
how to what?
yeah i can try
On Windows in Powershell you can first go to the top folder of the pack with cd ...
Then run tree /f
It prints a text of your file structure
Only copy it if it shows JUST your datapack files though
It might give us a hint as we can see all folders and files and their respective locations in the pack
wait so what do i type in powershell? i actually never used powershell sorry
First make sure the path at the left is your datapack folder (where the pack.mcmeta is in)
Then type tree /f
k
C:.
└───example_datapack
│ pack.mcmeta
│
└───data
└───example
└───function
diamond_sword.mcfunction
omg thats really cool
Okay that looks completely fine
yeah i know
wierd
and i also tried to make another file following the steps
(like a whole new datapack file in another world)
doesnt work
what version is your datapack
its for 26.1, and the world as well