launcher: find data packs on Modrinth and install one into a world
The Mods page gains a Data packs tab: Modrinth's data packs for 26.3, each marked Partly with what Horizon runs of a data pack today (functions, function tags, predicates, item modifiers). Install puts the project's data pack file (not its mod build), checksum checked, into the datapacks/ of a world picked on the tab, and says what of that zip runs and what isn't read yet. A pack with nothing Horizon runs (worldgen only) is refused. The world's list on Home shows it. CLI and MCP: `mods search --kind datapack`, `mods install <pack> --world <world>`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,15 @@ pub(super) struct WorldPacks {
|
||||
note: Option<Result<String, String>>,
|
||||
}
|
||||
|
||||
impl WorldPacks {
|
||||
/// Reads the open world's packs again, after something else changed them.
|
||||
pub(super) fn reread(&mut self) {
|
||||
if let Some(world) = &self.open {
|
||||
self.list = datapacks::list(world);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Launcher {
|
||||
/// Opens or closes the packs of `world` under its row.
|
||||
pub(super) fn toggle_world_packs(&mut self, world: &World) {
|
||||
|
||||
Reference in New Issue
Block a user