Expand description
Content registration (custom items / blocks / food).
Modules§
- 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).
Structs§
- Armor
Defense - Defense points per armor piece.
- Armor
Material - 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. - Armor
Piece - An item as a piece of armor.
- Biome
Feature - A placed feature (
mymod:mythril_ore, the mod’s datapack’s) added to biomes at a generation step — what an ore.ydefmakes. Forge and NeoForge read the biome modifiersyog buildwrites; Fabric’s host adds these through its biome API. - Block
Def - A custom block to register; it also gets a matching block-item.
- Block
Property - A property of a block’s own: its name and values (the first the
default;
false,trueis a yes/no). - Entity
Def - An entity type to register (
.yentity). Its look is a body model (model,.ymodel) with clips by state; what it does beyondgoalsis the mod’s code (entity events, a tick of its own). - FoodDef
- Nutritional properties for a food item.
- ItemDef
- A custom item to register, identified by
namespace:path. - 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
LootModifieradds. - Loot
Modifier - Changes a mod makes to the loot of some tables: adds items, scales
some. A
.ydef(kind: "loot_modifier") or built in code. - Loot
Scale - Item counts a
LootModifierscales. - Loot
Stack - A stack of items: its id, how many, and its custom data (SNBT,
{}for none). - Recipe
- A recipe, in Yog’s own format — what a
.yrecipesays. The host writes the recipe JSON of its Minecraft version from it. - Sound
Group - 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.ydefof kindsound_group) and names it inBlockDef::sound. - Startup
Grant - Grant items/books to every player once when they first join.
This is the Yog-side replacement for
grant_patchi_book.json. - Tool
Item - An item as a tool or weapon.
- Tool
Material - 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.
- Entity
Kind - What kind of entity a type is.
- Recipe
Kind - What a recipe is made of besides its result.
Constants§
- REGISTRATIONS_
FILE - What a
.yogregisters 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(aREGISTRATIONS_FILE) differs fromregistered: what it adds, removes and changes —<kind> <id>each.