content library
Game content on package:voxel_engine/core.dart: block and item
registries by string id, tags, mining times, inventories, crafting recipes,
loot tables and status effects.
Classes
-
BlockRegistry<
T extends BlockType> - A game's blocks, numbered in the order given. The number is the save contract: a chunk stores one byte per cell, so blocks are appended, never reordered or removed. Entry 0 is air.
- BlockType
-
One block of a game, named by string. The engine sees it through the
VoxelBlockTable a
BlockRegistryprojects; everything else here is the game's (hardness, tools, drops, tags). - EffectEvent
- What one tick of an effect did; the owner decides how it shows.
- EffectRow
- One active effect: seconds left and power.
- EffectType
- One timed buff or debuff. With a period it ticks: every period seconds it deals damage and heals heal, times its power. Its stats bend named stats while it lasts.
- Inventory
- Slots of ItemStacks, the first hotbarSize of them the hotbar. How many of an item fit a slot and how long it lasts are the game's, asked through stackSize and maxDurability.
-
ItemRegistry<
T extends ItemType> - A game's items by id.
- ItemStack
- One inventory slot's worth: an item, how many, and what is particular to this stack (its wear, a rolled bonus).
- ItemType
- One item of a game. A block's item names that block in block.
- LootEntry
- One row of a LootTable: chance to appear at all, then min..max of item.
- LootTable
- What a chest, a mob or a fishing line gives: every entry rolled once, in order.
- MiningRules
- How long blocks take to break: a block's hardness, divided by the speed of the right tool's tier.
- Recipe
-
One recipe: ingredients (item id to count) make count of result at
station (
''by hand). Shapeless: only the counts matter. - RecipeBook
- A game's recipes.
- StatModifier
- How an effect bends one stat, per point of its power.
- StatusEffects
- The effects on one body. Ticking damage and healing come back from tick as events, so the owner applies and shows them.