Skip to main content

Module content

Module content 

Source
Expand description

Content registration (custom items / blocks / food).

Modules§

atlases
The game’s texture atlases as data (assets/atlases.ydata): what a .ytexture can be packed into.
effects
Attributes, mob effects and potions a mod adds: data (.ydef kinds attribute, effect, potion), the host registers each with the game.
item_looks
How the game draws items whose look isn’t their textures alone — heads, spawn eggs, tinted potions and leather — as data (assets/item_looks.ydata), for tools that show items as the game does.
loot
Loot: what a loot table gave — a chest’s, a block’s drops, a mob’s — as the mods see it before it’s handed out (Loot), and what a mod changes in it declaratively (LootModifier, a .ydef).
recipe_kinds
Kinds of recipe: what slots a recipe of the kind fills and what values it has. A mod declares its own (.ydef kind: "recipe_kind"); the game’s are the same definitions, built in as data (GAME, data/recipe_kinds.ydata) — the one list every tool reads them from (the build, books, the IDE).
tool_levels
The game’s tool ladder as data (assets/tool_levels.ydata): its levels bottom to top, and the block tags that make a block need each level on every loader and version.

Structs§

ArmorDefense
Defense points per armor piece.
ArmorMaterial
What armor is made of. The game’s are built in (ArmorMaterial::built_ins); a mod declares its own in a .ydef (kind: "armor_material") or registers one.
ArmorPiece
An item as a piece of armor.
Atlas
One of the game’s atlases.
AttributeDef
A number every player has (hexcasting:grid_zoom) — what effects change (EffectDef::modifiers) and the mod reads (Server::entity_attribute_value).
BiomeFeature
A placed feature (mymod:mythril_ore, the mod’s datapack’s) added to biomes at a generation step — what an ore .ydef makes. Forge and NeoForge read the biome modifiers yog build writes; Fabric’s host adds these through its biome API.
BlockDef
A custom block to register; it also gets a matching block-item.
BlockProperty
A property of a block’s own: its name and values (the first the default; false, true is a yes/no).
Brew
A brewing stand recipe making a potion: one potion and an ingredient.
EffectDef
A mob effect (hexcasting:enlarge_grid): its kind, its color (its particles, its potions) and the attributes it changes. Its icon is the mod’s textures/mob_effect/<name>.png, its name effect.<ns>.<name>.
EffectModifier
An attribute an effect changes while it lasts — by amount for each level.
EntityDef
An entity type to register (.yentity). Its look is a body model (model, .ymodel) with clips by state; what it does beyond goals is the mod’s code (entity events, a tick of its own).
FoodDef
Nutritional properties for a food item.
Hangs
What an item hangs on a wall (ItemDef::hangs).
ItemDef
A custom item to register, identified by namespace:path.
ItemLooks
The game’s item looks.
ItemTint
A colour the game tints an item’s first layer with: these items, or every item whose id starts with prefix.
LevelTag
A block tag, and where it applies: <loader|any>/<version>, or everywhere when empty.
LookModels
The models items are drawn through in a GUI.
Loot
A loot table rolled: where and for whom, and what it gave. Handlers change items; each sees the one before’s result.
LootAdd
An item a LootModifier adds.
LootModifier
Changes a mod makes to the loot of some tables: adds items, scales some. A .ydef (kind: "loot_modifier") or built in code.
LootScale
Item counts a LootModifier scales.
LootStack
A stack of items: its id, how many, and its custom data (SNBT, {} for none).
PotionDef
A potion (hexcasting:enlarge_grid_long): the effects it gives, and the brewing that makes it. Its names are the game’s item.minecraft.potion. effect.<name> (splash, lingering and tipped arrow alike).
PotionEffect
An effect a potion gives.
Recipe
A recipe, in Yog’s own format — what a .yrecipe says. The host writes the recipe JSON of its Minecraft version from it.
SoundGroup
What a block sounds like: the sound events it plays when broken, stepped on, placed, hit while mining and fallen on. The game’s groups are built in (SoundGroup::built_in); a mod registers its own (Registry::register_sound_group, or a .ydef of kind sound_group) and names it in BlockDef::sound.
StartupGrant
Grant items/books to every player once when they first join. This is the Yog-side replacement for grant_patchi_book.json.
ToolItem
An item as a tool or weapon.
ToolLadder
The game’s tool ladder.
ToolLevel
One of the game’s tool levels.
ToolMaterial
What tools are made of. The game’s are built in (ToolMaterial::built_ins); a mod declares its own in a .ydef (kind: "tool_material") or registers one (Registry::register_tool_material).

Enums§

Cooking
How a cooking recipe cooks.
EffectCategory
Whether an effect is good or bad for whoever has it (its color in the inventory, what milk and beacons do with it).
EntityKind
What kind of entity a type is.
ModifierOperation
How a modifier changes an attribute.
RecipeKind
What a recipe is made of besides its result.

Constants§

REGISTRATIONS_FILE
What a .yog registers when the game starts — content the game can’t add or change while it runs (blocks, items, entity types, sound groups, materials, dimensions): a line each, <kind> <id> <hash>, the hash of what can’t change. A hot reload compares the new .yog’s with what’s registered (registration_changes).

Functions§

registration_changes
How new (a REGISTRATIONS_FILE) differs from registered: what it adds, removes and changes — <kind> <id> each.