I'm trying to configure a datapack and this is my first time configuring it so some walkthrough would be appreciated.
If i try to directly configure it though the files tab, I'm assuming I need to first unarchive it. But where can I find the files/folder? And once I'm done editing, how do I convert the folder to a .jar folder?
Also I'm not sure if this is correct, but is it true that if the server has the datapack, you don't need to have it installed on your client side?
#[Minecraft] Configuring a Datapack
37 messages · Page 1 of 1 (latest)
Most Datapacks are configured via command.
And datapacks are never jars.
Datapacks belong to the world - so it only has to live with the world itself.
This one in particular supports config files:
https://modrinth.com/mod/mob-captains
It's a datapack that has been packaged as a mod.
I'm not quite following what you mean by "datapacks belong to the world", so if the server has it, you don't need to have it on your client?
I'm trying to config the list of entity types that can spawn as a mob captain, which is something I can't configure using command.
That one you can only do via the file
I've never seen a datapack get packaged up as a Jar before...that's strange. Yet apparently totally a thing.
Usually you take a datapack which is a .zip file and throw it into the datapacks folder located in your world's folder.
I don't know the proper way to edit the datapacks files once its .jar'ed, however the download button on the Modrinth page gives the option to download it as a proper datapack. That you can just unzip, edit, and rezip again to put in the world/datapacks folder.
I see! Thank you so much!
Could you please help me with this question as well? ;-;
Yup,
there is a datapacks folder located in your server's file manager at world/datapacks. Datapack .zip files go here.
The datapack only needs to be on the server and does not go on your client.
Note that using a "mod-wrapped" datapack may require existing on both sides - it depends on how they wrapped it.
Alright, I will quickly update my modpack for this.
Most of the ones I've seen either have extra functionality as a mod (like external config files), or it's a mod doing part of the functionality by just registering a datapack, and isn't available as a standard datapack.
You can access a chat based configuration menu while ingame by running the command /function ps-mob:config if you have operator permissions.
Using the datapack is configured via command, not unzipping and editing a file.
Alright I will keep this ticket open for directions and references.
I don't know the proper way to edit the datapacks files once its .jar'ed
On the off chance that you don't already know it: the "ar" in "jar" stands for "archive". Jar files are archives similar to zip and gz archives. There are tools like 7-Zip that can manipulate them, and I believe that the latest iteration of Windows 11 knows how to unpack/re-pack them, too.
Yeah, I know how a .jar works. I don't know what magic they're using to make a datapack run as it.
As a Java dev, please do not mention this to people who haven't found it on their own. Jar internals are specific enough this will only result in weird breakages that will be impossible to diagnose.
I did preface that with "on the off chance..."
Oh, and the "J" in "jar" stands for JUST LEAVE IT THE HELL ALONE
Hiya, sorry for the late update. But after re-adding the mod as a datapack, seem to completely break it. Server is no longer detecting it. Was I not supposed to put it in the datapack folder like how it is on my client?
Can you define "completely break it"?
You also don't add a mod as a datapack - you would need the datapack version.
Yes, I installed the datapack version as suggested yesterday and removed the mod version. However doing so seems to break it. As when I do the command /datapack list, Mob Captains is not on the list.
!llogs
Please send some logs over so we can help resolve your issue. To access logs on your Minecraft server, please navigate to your server panel's File Manager and take the following path:
1. Open the Server's File Manager
2. Navigate inside the 'logs' folder
3. Click on "latest.log" to download it and send the file over Discord to this channel.
I'm not seeing where anyone recommended swapping the mod for the datapack, though.
"however the download button on the Modrinth page gives the option to download it as a proper datapack. That you can just unzip, edit, and rezip again to put in the world/datapacks folder."
oh one sec, i didnt realise it was auto deleting the mclogs
I see the issue, I put it in the wrong folder.
The only thing you are supposed to unzip to edit is the loot tables?