Closed nhasdarjian closed 7 months ago
May I ask why propagating datapack changes to custom worlds is useful? When developing datapacks, I assume you have developer mode turned on, which wipes the server of its worlds every server start-up. In other words, why use custom worlds when updating datapacks?
My intention was not actually datapack development, sorry I wasn't clear. I don't have developer mode enabled.
I intend to run multiple worlds on my server, with different datapacks enabled on each one.
Since DatapackLoader keeps its own folder of datapacks to apply to world/level.dat, I was hoping to apply a subset of datapacks to custom_world_a/level.dat, custom_world_b/level.dat, etc. with some level of customizability.
I want to preserve those worlds between server starts, as they are persistent with player builds.
Clarification, what I meant by "datapack changes" was "changes to the contents of DatapackLoader/datapacks".
I played around with different worlds having different datapacks, both with manual creation and creation via MyWorlds, and it confirmed my suspicion that the server only recognizes datapacks inside the automatically-generated 'datapacks' folder in the main world folder. Unless you know of a way to make per-world datapacks possible, I recommend connecting multiple servers (ex. Waterfall) to simulate the experience of different worlds having different datapacks.
DatapackLoader is very effective at modifying and maintaining datapacks for
level.dat
in/world
.On my server, I use the MyWorlds plugin to manage custom dimensions. As far as I have seen, DatapackLoader only looks at
/world
on server startup.As a result, the datapacks applied on a given custom world are equivalent to the datapacks enabled on the default world at the time the custom world was created.
To propagate datapack changes to custom worlds, I propose a simple solution:
Add a list of directories containing
level.dat
files in the generatedconfig.yml
. This could look like:Users can define custom worlds to let the plugin manage, and the plugin will treat the
level.dat
files in each folder the same way that it doeslevel.dat
in/world
and keep it consistent withsourceList.txt
.If you wanted to expand on this, you could add extra options for granular control. This could look like a
worlds.yml
file with the contents:When
sync-all
is true, then DatapackLoader will sync that world'slevel.dat
with the contents ofsourceList.txt
, excluding any datapack files listed inexceptions
.When
sync-all
is false, then DatapackLoader will only sync that world'slevel.dat
with the files listed inexceptions
.Thanks for your time in reviewing my suggestion.