#trying to create a data pack

1 messages · Page 1 of 1 (latest)

proud cave
#

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!

floral dawnBOT
proud cave
#

oh

#

oops

proud cave
#

i did everything it told me and it doesnt work tho

raven stratus
#

does it just not show up in the datapack selection screen, or...?

proud cave
#

imma try it in 1.21.11 tho just incase

forest herald
#

What version would you want your datapack to be for?

keen leaf
#

if your datapack version is 1.21 or above then change the folder names without s except tags

proud cave
keen leaf
#

check logs

proud cave
floral dawnBOT
proud cave
#

ill try

proud cave
# keen leaf check logs

so it looks like its working, just doesnt do anything when i run the function. although the logs say the function ran succesfuly

keen leaf
#

your function is empty

proud cave
keen leaf
#

uh huh

#

and when you run the function it doesnt give you a diamond or say hello world?

proud cave
#

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)

keen leaf
#

then it works

undone hemlock
#

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.

proud cave
tough spire
#

You need to show your work

#

A screenshot of the folder structure for starters

proud cave
keen leaf
#

whats the problem

tough spire
#

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?

proud cave
keen leaf
#

what doesn't work

#

what are you referring "it" to?

forest herald
#

Does your datapack show when you list the datapacks with /datapack list?

proud cave
forest herald
#

it does auto complete your command?

#

Have you checked the logs or tried it with /debug?

proud cave
#

wow its really hard to not answer you delayed cause you dont reply

#

i mean like not reply so that it pings

forest herald
# proud cave 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

proud cave
forest herald
#

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

proud cave
#

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

forest herald
#

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.

proud cave
#

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

forest herald
proud cave
forest herald
#

Recipes don't show by themselves, crafting them once adds them to your book, but they don't appear by default.

proud cave
#

i figured

#

wow thats a wierd behavior

#

i also followed the tutorial the server has

keen leaf
#

can you put say hi

forest herald
#

What OS are you on? Do you know how to run a tree command from the root folder of your datapack?

keen leaf
#

and see if the message pops up

proud cave
forest herald
#

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

proud cave
forest herald
#

First make sure the path at the left is your datapack folder (where the pack.mcmeta is in)

#

Then type tree /f

proud cave
#

k

#

C:.
└───example_datapack
│ pack.mcmeta

└───data
└───example
└───function
diamond_sword.mcfunction

#

omg thats really cool

forest herald
#

Okay that looks completely fine

proud cave
#

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

keen leaf
#

what version is your datapack

proud cave