Darkhax-Minecraft / Open-Loader

An open source resource and data loader for Minecraft.
GNU Lesser General Public License v2.1
19 stars 7 forks source link

[SUGGESTION] Ability to only apply datapacks to specific types of worlds #24

Closed Drigonis closed 2 years ago

Drigonis commented 2 years ago

I think it would be useful if it was possible to only apply datapacks to certain types of worlds, and also not download them into existing ones. Some examples of parameters would be: Default gamemode, difficulty, generation type (like Superflat), etc.

For example, let's say I want to install The Creeper's Code onto all survival worlds. I can just put it into a special folder (or maybe set what worlds it goes into via a .json file?) and I won't ever get it on Creative, Adventure or Hardcore worlds. Alternatively, I could make it inverted, so Creative worlds are blacklisted, rather than Survival worlds being whitelisted - so I get it on Survival, Hardcore, and Adventure worlds.

It should also (obviously) be possible to make multiple parameters, and also have different parameters for different datapacks - for example, if Terralith is only installed on non-Superflat Adventure worlds, but The Creeper's Code is installed on all non-Creative worlds. This means that if I made an Adventure world, I'd get Terralith and The Creeper's Code, but if I decided to make it Superflat, I would only get The Creeper's Code, and if I made it Creative, I wouldn't get any datapacks.

I'm probably over-explaining some obvious things here, but oh well.

Darkhax commented 2 years ago

The vanilla game already allows datapacks to be installed to just specific worlds, the whole point of this mod is opening up the system to global folders. While there could be some niche benefits to having global load conditions, the datapack system is very specific about when and how packs are loaded and that will not play nice with your conditions. For example packs must be loadable before the world is created, and there is no difficulty or world type context at that time. There is also the issue of forcing packs to be reloaded when those conditions change, for example when the user or server changes their difficulty while the game is loaded. It's technically possible, but the added complexity would weigh the core functionality of this mod down significantly.