Expand description
The block/item model editor’s backend (.yblock / .yitem, see
docs/blocks-items.md): textures as the editor names them, the
texture picker’s list, vanilla/parent models for preview, and
yog import.
Structs§
- Animation
- A texture’s animation (
.png.mcmeta), as the game plays it: framesframe_width×frame_heightlaid row by row over the image, shown inframesorder, each for itstimein ticks. - Animation
Frame - Texture
- Texture
Choice
Functions§
- armor_
materials - What an armor piece’s
materialoffers: the game’s, then the mod’s. - body_
texture - A body model’s texture (
.ymodel):@texture:<ns>:<path>, as a content file’s. - content_
block_ faces - The textures of the mod’s block
id(its.yblockmodel’s), per face: up, down, north, south, west, east — as png bytes.None: not a block of the mod. - content_
block_ model - The model of the mod’s block
idas its.yblockgives it: itselementsand its textures by variable (png bytes).None: not a block of the mod, or its model has no elements of its own. - content_
icon - The icon of the mod’s item or block
idas itscontent/file draws it: the model’slayer0(else its first texture), as png bytes. - content_
item_ appearance - A mod item’s definition and, for potions, its effect-derived color.
- import
yog import <kind> <source> [--model <id>] [--force](kind:resourcepack,bbmodel, orbbmodel-item) in the mod offile(a content file or the mod folder) → what it printed.- item_
potion_ color - The color of the potion effect(s) defined by this
.yitem. - own_
texture - The mod and the id of texture
texturewhen it’s the mod’s own (it can be painted in place, or added);Nonefor the game’s, another mod’s, a#slot. - parent_
model - A model by id, parents flattened:
{textures, elements?, display, parent?}whereparentis the vanilla sprite/builtin root it ends at, if any. - sound_
groups - What a block’s
soundoffers: the game’s sound groups, then the mod’s. - strings
- The
@<Set>.<name>texts of the mod’s.yresfiles — the name/tooltip picker’s choices. - tags
- What a
tagslist of content inregistry(item,block) offers: the mod’s own tags by bare name (as the build last listed them), then Yog’s common tags. - texture
- textures
- Everything the texture picker offers.
- tool_
materials - What a tool’s
materialoffers: the game’s, then the mod’s. - write_
animation - Sets the animation of texture
textureof the mod (None: still) in its.ytexture; the file written. - write_
texture - Writes
pngas the picture of the mod’s texturetexture; the.yreswritten.