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/.yitemcontent 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.yrecipefiles, one recipe each (crafting, shapeless, smelting), edited in its recipe editor. See Yog-IDLE’sdocs/blocks-items.mdfor the formats.- design
- The
.yuiscreen designer’s backend: the canvas drawn by yog-ui itself (the crate mods render with in game) through a recordingYogGfxApi, 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_DIAGNOSTICSnames (yog_ids::env::DIAGNOSTICS) — while the text goes on as ever (each one’sDisplay). - 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 generatedCargo.tomland 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:
.yuiread 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
.yresresource files — a mod’s texts, images, sounds, files, colors, numbers and flags, like a C# project’sResources/*.resx. See Yog-IDLE’sdocs/yres.mdfor the format.
Functions§
- slash_
path pathwith/between its parts, whatever the system’s separator.