Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure Spyglass with packtest commands.json and mcdoc definitions #1059

Merged
merged 4 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions base/mod.mcdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
dispatch minecraft:storage[gm4:log] to struct Gm4Log {
versions?: [LogVersion],
traverse_versions?: [LogVersion],
log?: struct {
require_id?: string
},
outdated_list?: [LogEntry],
queue?: [LogEntry],
temp?: #[text_component] string,
}

struct LogVersion {
id: string,
module: string,
version: string,
from?: string,
}

struct LogEntry {
type: ("text" | "install" | "outdated" | "missing" | "version_conflict"),
...gm4:log_entry[[type]],
}

dispatch gm4:log_entry[text] to struct {
/// The text component message to display.
message: #[text_component] string,
}

dispatch gm4:log_entry[install] to struct {
/// The name of the module that was just installed.
module: string,
}

dispatch gm4:log_entry[outdated] to struct {
module: string,
download: #[url] string,
render: #[text_component] string,
}

dispatch gm4:log_entry[missing] to struct MissingLog {
/// The name of the module.
module: string,
/// The ID of the module.
id: string,
/// The name of the dependency.
require: string,
/// The ID of the dependency.
require_id: string,
}

dispatch gm4:log_entry[version_conflict] to struct {
...MissingLog,
/// The required version of the dependency.
require_ver: string,
}
Loading
Loading