Expand description
The yog CLI’s internals: yog.toml parsing, the generated
.yog-build/ 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§
- bench
yog bench— a mod’s benchmarks:benches/*.rsfiles whose#[yog_api::bench]functions run under criterion.- book_
page - A mod’s own kinds of book page:
.yuicomponents withbook_page, compiled intoyog_formats::book::page_type::PageTypes for the books that use them (see that module). - cargo_
toml - The generated
.yog-build/Cargo.toml. - 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. - exports
yog publish exports— the-exportscrate generated from a mod’s#[yog_export]items.- manifest
yog.toml— a mod project’s manifest, the only build file mod authors write.- media
- A mod’s media as the tools see them: its
.yrespictures (bytes and all), its.ytextures, and the files the build makes of them — so the IDE previews and edits what the build will make, converting nothing itself. Reading is cached until a file changes. - recipe_
area <RecipeArea kind="crusher" x="…" y="…"/>in an inventory screen: the kind’s layout (its.yuirecipe_layout, seeyog_formats::book::layout) made real — its places become the container’s slots (numbered after the screen’s own), its result an output slot, its pictures and stations drawn — and a<Machine>that tells the game which slot is which: the block makes recipes of the kind like a crafting table.- serve
yog serve— the CLI as a service for tools (Yog-IDLE): one JSON request per line on stdin, one reply per line on stdout. Every format is read, written and converted here, so a tool needn’t be rebuilt when a format changes — only this binary.- 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.- yui
.yuiscreen files — the declarative form of ayog-uiwidget tree that Yog-IDLE’s screen designer edits — and their code generation.- yui_
component - Component
.yuifiles: a<Component>root declaring properties and events, with one body element bound to them through{x:Bind ...}(the same bindings as view-model screens, [crate::yui_vm::compile_bind]). Generates a struct with one typed field per property and itsyog_api::ui::component::Componentimplementation, registered withui_component!. See Yog-IDLE’sdocs/yui.md, “Components”. - yui_
grid <Grid>in.yui— WPF’sGrid: rows and columns, children placed in cells with attachedGrid.Row/Grid.Column/Grid.RowSpan/Grid.ColumnSpan.- yui_vm
- View-model screens: a
.yuiwhose<Screen>hasx:ViewModel="MyVm"compiles into ayog_kit::View— the static widget tree (built bycrate::yui’s generator), compiled{x:Bind ...}bindings patching it, commands, two-way text boxes and toggles, lists with item templates, and theregister/open/closefunctions. Seedocs/mvvm.mdin Yog-IDLE for the format.