Skip to main content

yog_ids/names/
content.rs

1//! Resources, files and content: where things live and what they're called.
2
3names! {
4
5    /// A `.yres` entry's type (`{ "type": "sound", ... }`).
6    res_kind {
7        STRING = crate::word::STRING,
8        IMAGE = crate::typed::IMAGE,
9        FILE = crate::word::FILE,
10        SOUND = crate::word::SOUND,
11        COLOR = crate::word::COLOR,
12        NUMBER = crate::word::NUMBER,
13        BOOL = crate::word::BOOL,
14        VIDEO = crate::word::VIDEO,
15    }
16
17    /// What an image source starts with (`item:apple`).
18    image_scheme {
19        ITEM = crate::kind::ITEM,
20        BLOCK = crate::kind::BLOCK,
21        SPRITE = crate::word::SPRITE,
22        MOD = crate::word::MOD,
23        VIDEO = crate::kind::VIDEO,
24    }
25
26    /// Yog's files with a fixed name.
27    file {
28        /// A mod's manifest.
29        MANIFEST = crate::concatcp!(crate::ns::YOG, crate::sep::DOT, "toml"),
30        /// The versions a mod's build resolved.
31        LOCK = crate::concatcp!(crate::ns::YOG, crate::sep::DOT, "lock"),
32    }
33
34    /// What a built `.yog` holds besides the mod's files.
35    archive {
36        /// What it says about its mod (`yog_formats::manifest::Built`, Yog Data).
37        MANIFEST = crate::concatcp!(crate::word::MOD, crate::sep::DOT, crate::Format::Data.ext()),
38        /// Its native libraries, one folder per platform: `natives/linux-x86_64/libmymod.so`.
39        NATIVES = "natives",
40        /// Its Yog Script compiled for the JVM, a jar per game version (its
41        /// Java's): `scripts/1.21.1/<mod>.jar`, its mods found by
42        /// `ServiceLoader` (`dev.yog.script.YsMod`).
43        SCRIPTS = "scripts",
44    }
45
46    /// A picture of few colors as a `.yog` keeps it (`yog_media::yimage`):
47    /// under its `.png` name, told apart by these first bytes; the host
48    /// hands the game its PNG, made in memory.
49    yimage {
50        MAGIC = "YIMG",
51    }
52
53    /// A release's debug info, split from its natives: one folder per
54    /// platform (`symbols/linux-x86_64/libmymod.so.debug`), read beside the
55    /// stripped native or from Yog Installer's symbols component.
56    symbols {
57        DIR = "symbols",
58        /// What a native's split debug info adds to its file name.
59        EXT = "debug",
60    }
61
62    /// The pack the build writes for the hosts.
63    pack {
64        /// The game's data: `data/<ns>/…`.
65        DATA = crate::word::DATA,
66        /// The game's assets: `assets/<ns>/…`.
67        ASSETS = "assets",
68        /// Tags, under a namespace's data: `data/<ns>/tags/<registry>/<path>.json`.
69        TAGS = "tags",
70        /// Worldgen, under a namespace's data: `data/<ns>/worldgen/<registry>/<path>.json`.
71        WORLDGEN = "worldgen",
72        /// Overlays for one loader and version: `when/<loader>/<version>/<file>`.
73        OVERLAYS = crate::word::WHEN,
74        /// An overlay's loader when it's for every loader.
75        ANY_LOADER = crate::word::ANY,
76        /// An overlay's version when it's for every version.
77        ANY_VERSION = crate::word::ANY,
78    }
79
80    /// A mod project's folders.
81    project {
82        /// Its resources: `.yres` sets, `.ytexture`s, ….
83        RESOURCES = "resources",
84        /// Its content: blocks, items, recipes, books, definitions.
85        CONTENT = crate::word::CONTENT,
86        /// Where a copy of a game font goes, under its content.
87        FONT_COPIES = crate::kind::FONT,
88        /// Its code and screens.
89        SRC = crate::word::SRC,
90        /// What `yog build` makes on the way (as .NET's `obj/`): the generated
91        /// crate, generated code, exports crates, cargo's `target/`.
92        OBJ = "obj",
93        /// Cargo's build output, under `obj/`.
94        TARGET = crate::concatcp!(crate::project::OBJ, crate::sep::PATH, crate::word::TARGET),
95        /// The code and data the build generates, under `obj/`.
96        GENERATED = crate::concatcp!(crate::project::OBJ, crate::sep::PATH, "generated"),
97        /// What `yog build` makes (as .NET's `bin/`): the `.yog`, one a
98        /// platform, split debug info.
99        BIN = "bin",
100    }
101
102    /// The game's versions Yog runs on, oldest first: each has its hosts'
103    /// `<loader>/versions/<version>.properties` (the loaders that exist
104    /// for it: NeoForge begins at 1.20.1). `.yns` targets a range of
105    /// them; `yog build` checks every patch on each.
106    game_version {
107        V1_19_2 = "1.19.2",
108        V1_20_1 = "1.20.1",
109        V1_21_1 = "1.21.1",
110        V26_2 = "26.2",
111    }
112
113    /// A game's folders Yog uses.
114    game_dir {
115        /// The `.yog` mods the game loads: `<game>/yog-mods`.
116        MODS = crate::concatcp!(crate::ns::YOG, crate::sep::HYPHEN, crate::word::MODS),
117    }
118
119
120    /// Yog's programs.
121    program {
122        /// The command-line tool (`yog build`, `yog schema`, …).
123        CLI = crate::ns::YOG,
124        /// The CLI's service command: tools read and write every format through it.
125        SERVE = "serve",
126        /// Yog Script's tool (`yog-script check`, `yog-script index`), installed
127        /// as its own component; the CLI compiles a mod's scripts through
128        /// `yog-script-build` itself.
129        SCRIPT = "yog-script",
130    }
131
132    /// The structs the generated code names a mod's content by
133    /// (`Items::RUBY`); a `.yres` set of the same name holds that content's
134    /// names (`Items.yres`: `item.<mod>.<name>`).
135    code_set {
136        BLOCKS = "Blocks",
137        ITEMS = "Items",
138        ENTITIES = "Entities",
139        ADVANCEMENTS = "Advancements",
140        MODELS = "Models",
141        ANIMS = "Anims",
142        TEXTURES = "Textures",
143    }
144
145    /// Yog's crates a mod's code builds with, as Cargo names them (Rust's
146    /// name has `_` for `-`: [`crate::rust_name`]).
147    rust_crate {
148        /// What every one of Yog's crates is named with.
149        PREFIX = crate::concatcp!(crate::ns::YOG, crate::sep::HYPHEN),
150        /// The API crate: its word, its name, its name in Rust code, and the
151        /// `[dependencies]` key that pins its version alone.
152        API_WORD = "api",
153        API = crate::concatcp!(PREFIX, API_WORD),
154        API_RUST_NAME = crate::concatcp!(crate::ns::YOG, crate::sep::WORD, API_WORD),
155        API_VERSION_KEY = crate::concatcp!(API_RUST_NAME, crate::sep::WORD, crate::serve_method::VERSION),
156        /// The API's feature a mod that sends to the server builds with
157        /// (`yog.toml`'s `[network] to_server`): without it, sending
158        /// doesn't compile.
159        API_TO_SERVER = "to-server",
160        ABI = crate::concatcp!(PREFIX, "abi"),
161        UI = crate::concatcp!(PREFIX, crate::word::UI),
162        KIT = crate::concatcp!(PREFIX, "kit"),
163        GFX = crate::concatcp!(PREFIX, "gfx"),
164        REGISTRY = crate::concatcp!(PREFIX, crate::serve_param::REGISTRY),
165        /// The data crate: its name, and its name in Rust code (yog-api's module of it too).
166        DATA = crate::concatcp!(PREFIX, crate::word::DATA),
167        DATA_RUST_NAME = crate::concatcp!(crate::ns::YOG, crate::sep::WORD, crate::word::DATA),
168    }
169
170    /// Where the game keeps resources, and what their files end with.
171    res {
172        /// The textures' folder: `<ns>:textures/<path>.png`.
173        TEXTURES = crate::concatcp!(crate::model::TEXTURES, crate::sep::PATH),
174        /// The models' folder: `<ns>:models/<path>.json`.
175        MODELS = crate::concatcp!(crate::word::MODELS, crate::sep::PATH),
176        /// The block states' folder: `<ns>:blockstates/<path>.json`.
177        BLOCKSTATES = crate::concatcp!("blockstates", crate::sep::PATH),
178        /// Items' textures and models: `item/apple`.
179        ITEM_DIR = crate::concatcp!(crate::kind::ITEM, crate::sep::PATH),
180        /// Item definitions (1.21.4+): `<ns>:items/<path>.json`.
181        ITEM_DEFINITIONS = crate::concatcp!(crate::word::ITEMS, crate::sep::PATH),
182        /// Equipment's worn looks (1.21.4+): `<ns>:equipment/<path>.json`.
183        EQUIPMENT = crate::concatcp!(crate::word::EQUIPMENT, crate::sep::PATH),
184        /// Worn equipment's textures (1.21.4+): `entity/equipment/<layer>/<path>`.
185        EQUIPMENT_TEXTURES = crate::concatcp!(crate::kind::ENTITY, crate::sep::PATH, crate::word::EQUIPMENT, crate::sep::PATH),
186        /// Armor's worn textures before 1.21.4: `models/armor/<path>_layer_<n>`.
187        ARMOR_TEXTURES = crate::concatcp!(crate::word::MODELS, crate::sep::PATH, crate::word::ARMOR, crate::sep::PATH),
188        /// Between an armor texture's name and its layer's number.
189        ARMOR_LAYER = "_layer_",
190        /// What a spawn egg's item path ends with: `<mob>_spawn_egg`.
191        SPAWN_EGG_SUFFIX = crate::concatcp!(crate::sep::WORD, crate::word::SPAWN_EGG),
192        /// Blocks' textures and models: `block/stone`.
193        BLOCK_DIR = crate::concatcp!(crate::kind::BLOCK, crate::sep::PATH),
194        /// The GUI atlas's sprites under `textures/` (1.20.2+).
195        GUI_SPRITES = crate::concatcp!(crate::word::GUI, crate::sep::PATH, "sprites", crate::sep::PATH),
196        /// The atlases' definitions: `<ns>:atlases/<atlas>.json` (every pack's sources combine).
197        ATLASES = crate::concatcp!("atlases", crate::sep::PATH),
198        /// The language files' folder: `<ns>:lang/<locale>.json`.
199        LANG = crate::concatcp!(crate::typed::LANG, crate::sep::PATH),
200        /// Models the game draws in code (`builtin/entity`), not from elements.
201        BUILTIN = crate::concatcp!("builtin", crate::sep::PATH),
202        /// Sounds: `<ns>:sounds/<path>.ogg`, their events in `<ns>:sounds.json`.
203        SOUNDS = crate::concatcp!(SOUNDS_WORD, crate::sep::PATH),
204        SOUNDS_JSON = crate::concatcp!(SOUNDS_WORD, JSON),
205        SOUNDS_WORD = "sounds",
206        /// Particles' pictures: `<ns>:particles/<name>.json`.
207        PARTICLES = crate::concatcp!("particles", crate::sep::PATH),
208        OGG = ".ogg",
209        PNG = crate::concatcp!(crate::sep::DOT, crate::word::PNG),
210        SVG = ".svg",
211        JSON = ".json",
212        MCMETA = ".mcmeta",
213    }
214
215    /// Yog's own ids.
216    yog {
217        /// An entity's data the hosts keep for the mods.
218        STATE = crate::id!(crate::ns::YOG, crate::word::STATE),
219        /// A hanging entity's attachment (its face, size, item).
220        HANGING = crate::id!(crate::ns::YOG, "hanging"),
221        /// The key an entity's data is saved under in its NBT.
222        ENTITY_NBT = crate::id!(crate::ns::YOG, crate::word::DATA),
223        /// The channel Yog Script's declared state (`synced` members) goes
224        /// to clients on.
225        SYNCED = crate::id!(crate::ns::YOG, "synced"),
226        /// The channel entity data is synced on.
227        ENTITY_DATA = crate::id!(crate::ns::YOG, crate::concatcp!(crate::kind::ENTITY, crate::sep::WORD, crate::word::DATA)),
228        /// The entity data key an entity's own hitbox travels under: width,
229        /// height, eye height as three little-endian f32.
230        DIMENSIONS = crate::id!(crate::ns::YOG, "dimensions"),
231        /// An inventory slot widget's id: `yog:slot:<index>`.
232        SLOT_PREFIX = crate::id!(crate::ns::YOG, "slot:"),
233        /// The player's inventory widget.
234        PLAYER_INVENTORY = crate::id!(crate::ns::YOG, crate::concatcp!(crate::word::PLAYER, crate::sep::WORD, crate::kind::INVENTORY)),
235        /// A machine screen's id: `yog:machine:<id>`.
236        MACHINE_PREFIX = crate::id!(crate::ns::YOG, "machine:"),
237        /// Yog's alias of a game potion: `yog:potion/<name>`.
238        POTION_ALIAS = crate::id!(crate::ns::YOG, "potion/"),
239        /// Yog's alias of a game font, `yog:font/<name>` — the only way
240        /// anything names one of the game's fonts.
241        FONT_ALIAS = crate::id!(crate::ns::YOG, "font/"),
242        /// The font text is drawn in by default (the game's).
243        DEFAULT_FONT = crate::concatcp!(FONT_ALIAS, crate::game_font::DEFAULT),
244        /// The model every mod's spawn egg inherits: Yog's egg in two layers, base and spots.
245        SPAWN_EGG_MODEL = crate::id!(crate::ns::YOG, crate::concatcp!(crate::res::ITEM_DIR, crate::word::SPAWN_EGG)),
246        /// The book's pictures.
247        BOOK_SHEET = crate::concatcp!(BOOK_TEXTURE, crate::sep::PATH, crate::kind::BOOK),
248        CRAFTING_SHEET = crate::concatcp!(BOOK_TEXTURE, crate::sep::PATH, "crafting"),
249        /// A screen being designed in the IDE.
250        DESIGNER_SCREEN = crate::id!(crate::ns::YOG, "designer"),
251        /// The screen a cutscene plays in (the runtime's own).
252        CUTSCENE_SCREEN = crate::id!(crate::ns::YOG, crate::word::CUTSCENE),
253        /// A book's default texture (its sheet is [`BOOK_SHEET`]).
254        BOOK_TEXTURE = crate::id!(crate::ns::YOG, crate::concatcp!(crate::word::GUI, crate::sep::PATH, crate::kind::BOOK)),
255        /// The textures the runtime renders SVG images into: `<prefix><key>_<w>x<h>`.
256        DYNAMIC_SVG_PREFIX = crate::id!(crate::ns::YOG, crate::concatcp!(crate::word::DYNAMIC, crate::sep::PATH, "svg", crate::sep::WORD)),
257        /// The textures the runtime shows videos' frames in:
258        /// `<prefix><player>.png`, a texture's full id (an image source as it is).
259        DYNAMIC_VIDEO_PREFIX = crate::id!(crate::ns::YOG, crate::concatcp!(crate::res::TEXTURES, crate::word::DYNAMIC, crate::sep::PATH, crate::word::VIDEO, crate::sep::WORD)),
260        /// The textures the runtime draws text in Yog's fonts into: `<prefix><n>`.
261        DYNAMIC_TEXT_PREFIX = crate::id!(crate::ns::YOG, crate::concatcp!(crate::word::DYNAMIC, crate::sep::PATH, crate::word::TEXT, crate::sep::WORD)),
262    }
263
264    /// The game's fonts, by name: Yog aliases each as
265    /// `yog:font/<name>` ([`crate::yog::FONT_ALIAS`]).
266    game_font {
267        DEFAULT = crate::word::DEFAULT,
268        /// Unifont.
269        UNIFORM = "uniform",
270        /// The enchanting table's.
271        ALT = "alt",
272        ILLAGERALT = "illageralt",
273    }
274
275    /// The game's attributes by name — the hosts find each on every
276    /// version (`max_health`, `generic.max_health` before 1.21.2).
277    attribute {
278        MAX_HEALTH = "max_health",
279    }
280
281    /// The game's modes a player is put in.
282    gamemode {
283        SURVIVAL = "survival",
284        CREATIVE = "creative",
285        ADVENTURE = "adventure",
286        SPECTATOR = "spectator",
287    }
288
289    /// The game's ids Yog's code names.
290    game {
291        /// The game's own id of its default font (hosts only; everything
292        /// else says [`crate::yog::DEFAULT_FONT`]).
293        DEFAULT_FONT = crate::id!(crate::ns::MINECRAFT, crate::game_font::DEFAULT),
294        /// The UI theme drawn like the game's own screens.
295        VANILLA_THEME = crate::id!(crate::ns::MINECRAFT, "vanilla"),
296        OVERWORLD = crate::id!(crate::ns::MINECRAFT, "overworld"),
297        /// The empty block: what's left where a block is removed.
298        AIR = crate::id!(crate::ns::MINECRAFT, crate::word::AIR),
299        /// The player entity's type.
300        PLAYER = crate::id!(crate::ns::MINECRAFT, crate::word::PLAYER),
301        /// The sound event that plays nothing: a block or item without a sound of its own.
302        NO_SOUND = crate::id!(crate::ns::MINECRAFT, "intentionally_empty"),
303        /// The biome a dimension is all of when it doesn't say.
304        PLAINS = crate::id!(crate::ns::MINECRAFT, "plains"),
305        THE_NETHER = crate::id!(crate::ns::MINECRAFT, "the_nether"),
306        THE_END = crate::id!(crate::ns::MINECRAFT, "the_end"),
307        /// The block tags of what each kind of tool mines: `<MINEABLE><kind>`.
308        MINEABLE = crate::id!(crate::ns::MINECRAFT, "mineable/"),
309        /// The texture the game draws where one is missing.
310        MISSING_TEXTURE = crate::id!(crate::ns::MINECRAFT, "missingno"),
311        /// What a book is given to players as.
312        WRITTEN_BOOK = crate::id!(crate::ns::MINECRAFT, "written_book"),
313        BOOK = crate::id!(crate::ns::MINECRAFT, crate::kind::BOOK),
314        /// What the game's attributes were named under before 1.21.2: `generic.max_health`.
315        OLD_ATTRIBUTE_PREFIX = crate::concatcp!(crate::word::GENERIC, crate::sep::DOT),
316        /// The language every lang file falls back to, and a mod's texts are written in.
317        LOCALE = "en_us",
318    }
319
320
321    /// The kinds of shape a schema describes itself with
322    /// (`yog_data::Shape::describe`, read by the IDE's property grids).
323    shape_kind {
324        ANY = crate::word::ANY,
325        BOOL = crate::word::BOOL,
326        INT = crate::word::INT,
327        FLOAT = crate::word::FLOAT,
328        STRING = crate::word::STRING,
329        ATOM = "atom",
330        TEXT = crate::word::TEXT,
331        IMAGE = crate::word::IMAGE,
332        COLOR = crate::word::COLOR,
333        BYTES = crate::word::BYTES,
334        RES = "res",
335        REF = "ref",
336        TAG = crate::kind::TAG,
337        REF_OR_TAG = "ref_or_tag",
338        REF_OR_IMAGE = "ref_or_image",
339        LIST = "list",
340        MAP = "map",
341        OPTIONAL = crate::word::OPTIONAL,
342        STRUCT = "struct",
343        ENUM = "enum",
344        /// A struct or enum written once in `defs`, referred to by name.
345        DEF = "def",
346    }
347
348    /// The elements of a `.yui` screen or component.
349    yui {
350        SCREEN = "Screen",
351        COMPONENT = "Component",
352        /// A component's declarations.
353        PROPERTY = "Property",
354        EVENT = "Event",
355        STYLE = "Style",
356        CANVAS = "Canvas",
357        COLUMN = "Column",
358        ROW = "Row",
359        GRID = "Grid",
360        /// A `<Grid>`'s row and column with limits, and the property elements
361        /// that hold them, as WPF writes them.
362        ROW_DEFINITION = "RowDefinition",
363        COLUMN_DEFINITION = "ColumnDefinition",
364        ROW_DEFINITIONS = crate::concatcp!(GRID, crate::sep::DOT, ROW_DEFINITION, crate::data_layout::PLURAL),
365        COLUMN_DEFINITIONS = crate::concatcp!(GRID, crate::sep::DOT, COLUMN_DEFINITION, crate::data_layout::PLURAL),
366        SCROLL_VIEW = "ScrollView",
367        LABEL = "Label",
368        BUTTON = "Button",
369        TOGGLE_BUTTON = "ToggleButton",
370        TEXT_BOX = "TextBox",
371        IMAGE = "Image",
372        VIDEO = "Video",
373        SURFACE = "Surface",
374        SPACER = "Spacer",
375        STAT_BAR = "StatBar",
376        LIST_VIEW = "ListView",
377        ITEMS_CONTROL = "ItemsControl",
378        CONTENT_PRESENTER = "ContentPresenter",
379        /// Slots: an item shown, an inventory's, the container's.
380        ITEM_SLOT = "ItemSlot",
381        INV_SLOT = "InvSlot",
382        SLOT = "Slot",
383        PLAYER_INVENTORY = "PlayerInventory",
384        /// Which container slot is which, for a block that makes recipes.
385        MACHINE = "Machine",
386        /// A kind of recipe's layout on an inventory screen.
387        RECIPE_AREA = "RecipeArea",
388        /// A recipe layout's places.
389        RECIPE_SLOT = "RecipeSlot",
390        RECIPE_RESULT = "RecipeResult",
391        RECIPE_COUNT = "RecipeCount",
392        /// A block in 3D, at a slot's angle (a recipe layout's station).
393        BLOCK_SLOT = "BlockSlot",
394        /// A book page type's elements.
395        BOOK_HEADER = "BookHeader",
396        BOOK_TEXT = "BookText",
397        BOOK_ITEM = "BookItem",
398        /// A picture the mod's code draws.
399        DRAWN = "Drawn",
400    }
401
402    /// The fields of the game's tag files (`data/<ns>/tags/<registry>/<path>.json`).
403    tag_file {
404        VALUES = crate::word::VALUES,
405        /// What a loader reads alongside `values` (Forge's).
406        OPTIONAL = crate::word::OPTIONAL,
407        REPLACE = "replace",
408        /// An entry that may be missing: `{ "id": …, "required": false }`.
409        ID = crate::word::ID,
410        REQUIRED = "required",
411    }
412
413    /// The game's atlas definitions (`atlases/<atlas>.json`): their sources —
414    /// a whole texture (`single`), or sprites cut from one picture
415    /// (`unstitch`, its regions).
416    atlas_source {
417        SOURCES = "sources",
418        TYPE = crate::word::TYPE,
419        SINGLE = "single",
420        UNSTITCH = "unstitch",
421        RESOURCE = "resource",
422        SPRITE = crate::word::SPRITE,
423        DIVISOR_X = "divisor_x",
424        DIVISOR_Y = "divisor_y",
425        REGIONS = "regions",
426        X = crate::word::X,
427        Y = crate::word::Y,
428        WIDTH = crate::word::WIDTH,
429        HEIGHT = crate::word::HEIGHT,
430        /// The game's atlases of blocks and of items.
431        BLOCKS = crate::word::BLOCKS,
432        ITEMS = crate::word::ITEMS,
433    }
434
435    /// The texture variables of the game's block models (`cube_all`'s `all`, a
436    /// column's `end`, …) — beside the faces' own names (`up`, `north`, …).
437    texture_slot {
438        ALL = "all",
439        SIDE = "side",
440        TOP = crate::word::TOP,
441        BOTTOM = crate::word::BOTTOM,
442        END = crate::word::END,
443        FRONT = "front",
444        /// A one-texture model's.
445        TEXTURE = crate::word::TEXTURE,
446    }
447
448    /// The game's block state properties Yog's blocks get, and their values.
449    block_state {
450        /// The way a block faces (a `direction`): the four sides, or up and down too.
451        FACING = "facing",
452        /// What an attached block hangs on.
453        FACE = "face",
454        FLOOR = "floor",
455        WALL = crate::word::WALL,
456        CEILING = "ceiling",
457        /// Whether it stands in water.
458        WATERLOGGED = "waterlogged",
459        /// A yes/no property's values.
460        FALSE = crate::word::FALSE,
461        TRUE = crate::word::TRUE,
462    }
463
464    /// The fields and kinds of the game's loot tables (`data/<ns>/loot_table/…`).
465    loot {
466        TYPE = crate::word::TYPE,
467        POOLS = "pools",
468        ROLLS = "rolls",
469        ENTRIES = crate::word::ENTRIES,
470        NAME = crate::word::NAME,
471        CONDITIONS = "conditions",
472        CONDITION = "condition",
473        FUNCTIONS = "functions",
474        FUNCTION = crate::word::FUNCTION,
475        COUNT = crate::word::COUNT,
476        MIN = "min",
477        MAX = "max",
478        BLOCK = crate::word::BLOCK,
479        PROPERTIES = "properties",
480        /// A block's table, and one nothing uses the way of.
481        BLOCK_TABLE = crate::id!(crate::ns::MINECRAFT, crate::word::BLOCK),
482        GENERIC_TABLE = crate::id!(crate::ns::MINECRAFT, crate::word::GENERIC),
483        /// An entry of an item.
484        ITEM_ENTRY = crate::id!(crate::ns::MINECRAFT, crate::word::ITEM),
485        /// A number between `min` and `max`.
486        UNIFORM = crate::id!(crate::ns::MINECRAFT, crate::game_font::UNIFORM),
487        SET_COUNT = crate::id!(crate::ns::MINECRAFT, "set_count"),
488        EXPLOSION_DECAY = crate::id!(crate::ns::MINECRAFT, "explosion_decay"),
489        SURVIVES_EXPLOSION = crate::id!(crate::ns::MINECRAFT, "survives_explosion"),
490        BLOCK_STATE_PROPERTY = crate::id!(crate::ns::MINECRAFT, "block_state_property"),
491        /// Where blocks' tables are: `loot_table/blocks/<path>`.
492        BLOCKS = crate::concatcp!(crate::word::BLOCKS, crate::sep::PATH),
493    }
494
495    /// The fields of a dimension as the build hands it to the runtime and
496    /// the runtime to the host.
497    dimension_field {
498        ID = crate::word::ID,
499        DIMENSION_TYPE = crate::concatcp!(crate::kind::DIMENSION, crate::sep::WORD, crate::word::TYPE),
500        BIOME = crate::kind::BIOME,
501        STRUCTURES = "structures",
502        FEATURES = "features",
503        MOB_SPAWNING = "mob_spawning",
504        /// The generator its chunks come from: its own terrain's, or one in code.
505        GENERATOR_TYPE = "generator_type",
506        /// Its terrain, which the runtime keeps (the host never sees it).
507        TERRAIN = "terrain",
508    }
509
510    /// Words a `.yui` attribute's value is.
511    yui_value {
512        TRUE = crate::word::TRUE,
513        FALSE = crate::word::FALSE,
514        /// A size the content decides.
515        AUTO = crate::word::AUTO,
516        START = crate::word::START,
517        CENTER = crate::word::CENTER,
518        END = crate::word::END,
519        LEFT = crate::word::LEFT,
520        RIGHT = crate::word::RIGHT,
521        TOP = crate::word::TOP,
522        BOTTOM = crate::word::BOTTOM,
523        /// Takes the room there is.
524        FILL = crate::word::FILL,
525        STRETCH = crate::word::STRETCH,
526        OUTLINE = crate::word::OUTLINE,
527        NONE = crate::word::NONE,
528    }
529
530    /// The markup of a `.yui` attribute's value: a binding (`{x:Bind name}`)
531    /// opens and closes so.
532    yui_markup {
533        BIND_OPEN = "{x:Bind ",
534        BIND_CLOSE = "}",
535        /// A binding's start, either way it's written (`{x:Bind …}`, `{Binding …}`).
536        BIND = "{x:Bind",
537        BINDING = "{Binding",
538        /// A design-time attribute: `d:text="Sample"` shows in the designer only.
539        DESIGN = "d:",
540        /// What a screen's resources element ends with: `<Screen.Resources>`.
541        RESOURCES = crate::concatcp!(crate::sep::DOT, "Resources"),
542    }
543
544
545    /// The game's kinds of tool (`item.tool.kind`); a mod's kind is the
546    /// block tag of what it mines.
547    tool_kind {
548        PICKAXE = "pickaxe",
549        AXE = "axe",
550        SHOVEL = "shovel",
551        HOE = "hoe",
552        /// A weapon: it mines nothing of its own.
553        SWORD = "sword",
554    }
555
556    /// The fields of the game's model JSON (block and item models, block states' variants).
557    model {
558        PARENT = "parent",
559        TEXTURES = "textures",
560        ELEMENTS = "elements",
561        DISPLAY = crate::word::DISPLAY,
562        FACES = "faces",
563        FROM = "from",
564        TO = "to",
565        UV = crate::word::UV,
566        ROTATION = "rotation",
567        TEXTURE = crate::word::TEXTURE,
568        /// A sprite item's (`item/generated`) first layer.
569        LAYER0 = "layer0",
570        /// The texture a block's particles take, and what a face falls back to.
571        PARTICLE = crate::word::PARTICLE,
572        /// A block state variant's model.
573        MODEL = crate::word::MODEL,
574        /// An element's rotation.
575        ORIGIN = "origin",
576        AXIS = "axis",
577        ANGLE = "angle",
578        RESCALE = "rescale",
579        /// Block states: variants by property values, or parts applied when they match.
580        VARIANTS = "variants",
581        MULTIPART = "multipart",
582        WHEN = crate::word::WHEN,
583        APPLY = "apply",
584        OR = "OR",
585        AND = "AND",
586        /// How a block's model is drawn (Forge/NeoForge read it; Fabric ignores it).
587        RENDER_TYPE = "render_type",
588        /// An item sprite's layers: `layer0`, `layer1`, …
589        LAYER = "layer",
590        SHADE = "shade",
591        CULLFACE = "cullface",
592        TINTINDEX = "tintindex",
593        AMBIENT_OCCLUSION = "ambientocclusion",
594        GUI_LIGHT = "gui_light",
595        TRANSLATION = "translation",
596        SCALE = "scale",
597        /// The parent a block model of its own elements takes: how it's held and shown in a slot.
598        BLOCK_PARENT = crate::id!(crate::ns::MINECRAFT, crate::concatcp!(crate::res::BLOCK_DIR, crate::kind::BLOCK)),
599        X = crate::word::X,
600        Y = crate::word::Y,
601        UVLOCK = "uvlock",
602        WEIGHT = "weight",
603    }
604
605    /// The fields of Yog's content files (`.yblock`, `.yitem`, `.ydef`) the tools read directly.
606    content_field {
607        ID = crate::word::ID,
608        KIND = crate::word::KIND,
609        MODEL = crate::word::MODEL,
610        ITEM_MODEL = crate::concatcp!(crate::kind::ITEM, crate::sep::WORD, crate::word::MODEL),
611        MATERIAL = crate::kind::MATERIAL,
612        ITEM = crate::kind::ITEM,
613        POTION = crate::kind::POTION,
614        EFFECTS = "effects",
615        EFFECT = crate::kind::EFFECT,
616        OF = "of",
617        COLOR = crate::word::COLOR,
618    }
619
620    /// The attributes of `.yui` elements.
621    yui_attr {
622        ID = crate::word::ID,
623        X = crate::word::X,
624        Y = crate::word::Y,
625        W = "w",
626        H = "h",
627        MIN_W = "min_w",
628        MIN_H = "min_h",
629        FLEX = "flex",
630        DOCK = "dock",
631        GAP = "gap",
632        PADDING = "padding",
633        BG = "bg",
634        COLOR = crate::word::COLOR,
635        ALIGN = "align",
636        HALIGN = "halign",
637        VALIGN = "valign",
638        MARGIN = "margin",
639        FONT_SCALE = "font_scale",
640        FONT = crate::kind::FONT,
641        SHADOW = "shadow",
642        NO_WRAP = "no_wrap",
643        ELLIPSIS = "ellipsis",
644        FOCUS_STYLE = "focus_style",
645        FOCUS_COLOR = "focus_color",
646        ENABLED = "enabled",
647        ON_CLICK = "on_click",
648        TOOLTIP = "tooltip",
649        WIDTH = crate::word::WIDTH,
650        HEIGHT = crate::word::HEIGHT,
651        ANCHOR = "anchor",
652        MODAL = "modal",
653        PAUSE = "pause",
654        LIVE = "live",
655        THEME = "theme",
656        TEXT = crate::word::TEXT,
657        PLACEHOLDER = "placeholder",
658        MAX_LENGTH = "max_length",
659        ON_CHANGE = "on_change",
660        ON_SUBMIT = "on_submit",
661        ITEM = crate::kind::ITEM,
662        COUNT = crate::word::COUNT,
663        INDEX = "index",
664        ACCEPTS = "accepts",
665        SOURCE = crate::word::SOURCE,
666        STRETCH = crate::word::STRETCH,
667        UV = crate::word::UV,
668        TINT = "tint",
669        KIND = crate::word::KIND,
670        RESULT = crate::word::RESULT,
671        PLACES = "places",
672        RECIPE_LAYOUT = "recipe_layout",
673        SLOT = "slot",
674        BLOCK = crate::kind::BLOCK,
675        /// A slot frame behind it, for layouts without their own picture.
676        FRAME = crate::word::FRAME,
677        SIZE = crate::word::SIZE,
678        /// A `<Component>` that is a kind of book page, its id.
679        BOOK_PAGE = "book_page",
680        /// A `<Property>`'s.
681        NAME = crate::word::NAME,
682        TYPE = crate::word::TYPE,
683        DEFAULT = crate::word::DEFAULT,
684        /// A book page's image and drawn picture.
685        SRC = crate::word::SRC,
686        DRAWER = "drawer",
687        DATA = crate::word::DATA,
688        STYLE = "style",
689        BASED_ON = "based_on",
690        ORIENTATION = "orientation",
691        /// A `<Grid>`'s tracks (`rows="Auto,*,26"`), the room between them,
692        /// and a `RowDefinition`'s / `ColumnDefinition`'s limits.
693        ROWS = "rows",
694        COLUMNS = "columns",
695        ROW_SPACING = "row_spacing",
696        COLUMN_SPACING = "column_spacing",
697        MIN_HEIGHT = "min_height",
698        MAX_HEIGHT = "max_height",
699        MIN_WIDTH = "min_width",
700        MAX_WIDTH = "max_width",
701        VALUE = crate::word::VALUE,
702        SELECTED = "selected",
703        CHECKED = "checked",
704        ITEM_HEIGHT = "item_height",
705        SCROLL_KEY = "scroll_key",
706        VISIBLE = "visible",
707        /// A resource's or style's key, an element's name (its id), what a style is for.
708        X_KEY = "x:Key",
709        X_NAME = "x:Name",
710        /// A view-model screen's type, how it's made, a template's item type.
711        X_VIEW_MODEL = "x:ViewModel",
712        X_CREATE = "x:Create",
713        X_DATA_TYPE = "x:DataType",
714        TARGET = crate::word::TARGET,
715        GRID_ROW = crate::concatcp!(crate::yui::GRID, crate::sep::DOT, crate::yui::ROW),
716        GRID_COLUMN = crate::concatcp!(crate::yui::GRID, crate::sep::DOT, crate::yui::COLUMN),
717        GRID_ROWSPAN = crate::concatcp!(crate::yui::GRID, crate::sep::DOT, "RowSpan"),
718        GRID_COLUMNSPAN = crate::concatcp!(crate::yui::GRID, crate::sep::DOT, "ColumnSpan"),
719    }
720}