Skip to main content

Crate yog_cli

Crate yog_cli 

Source
Expand description

The yog CLI’s internals: yog.toml parsing, the generated obj/ workspace, .yres resources, content/ blocks and items, .yui screens and #[yog_export] crates.

Not for external use — a library only so the yog binary, its tests and its benches share the code. No API stability, not published separately.

Modules§

content
.yblock / .yitem content files — a mod’s blocks and items: their properties, 3D model, block states and item form, in one JSON file each, edited in Yog-IDLE’s 3D model editor — and .yrecipe files, one recipe each (crafting, shapeless, smelting), edited in its recipe editor. See Yog-IDLE’s docs/blocks-items.md for the formats.
design
The .yui screen designer’s backend: the canvas drawn by yog-ui itself (the crate mods render with in game) through a recording YogGfxApi, rasterized with Minecraft’s own font and textures from the local game files; a preview mode driving the same tree with real UI events (click:X:Y, scroll:DY, scrollbar drags); and code-behind handlers.
diagnostics
What a build or a check finds, each as a record: what it is (a code), how bad, what’s wrong and where. Written for a tool — a Yog Data frame each to the file YOG_DIAGNOSTICS names (yog_ids::env::DIAGNOSTICS) — while the text goes on as ever (each one’s Display).
files
A project’s files: those of a Yog format under a folder, sources read and written as text, and files removed.
media
A mod’s media: its pictures, textures and videos as the tools see them (assets), sounds made Ogg (audio), FFmpeg (ffmpeg), sound montages rendered (mix), videos compiled (video).
project
A mod’s project: yog.toml, the generated Cargo.toml and Rust names, its #[yog_export] crate, its benchmarks.
script
A mod’s Yog Script (src/**/*.ys, *.yns): each source checked by the compiler (yog-script-build), what’s wrong reported at its file, line and column; errors stop the build.
serve
yog serve — the CLI as a service for tools (Yog-IDLE): frames of binary Yog Data (yog_data::io) on stdin and stdout, each request a [Request] and each answer a [Reply]. Every format is read, written and converted here, so a tool needn’t be rebuilt when a format changes — only this binary. Answers hold plain values: a typed one (@item:x) is sent as its string.
ui
Screens: .yui read and compiled to Rust (yui), components, the grid and resources they use, their view models (vm), a mod’s book page kinds and recipe areas.
yres
.yres resource files — a mod’s texts, images, sounds, files, colors, numbers and flags, like a C# project’s Resources/*.resx. See Yog-IDLE’s docs/yres.md for the format.

Functions§

slash_path
path with / between its parts, whatever the system’s separator.