# bworld The base game as a mod. The game loads its blocks, items, entities, recipes and textures from here, and its block and item behavior from `scripts/server.ts`, the same way it loads any other mod. Some of the base game is still built into the engine: recipe types, the inventory screen and crafting grid, the HUD, `/give` and `/time`, mining rules, and terrain generation. See "The Engine and the Base Game" in `docs/modding_plan.md`. ## Curios `scripts/curios.ts` is a port of [Curios](https://github.com/TheIllusiveC4/Curios): accessory slots, like rings, necklaces and belts, for any mod's items. They're in 2 columns left of the player's inventory, there whenever it's open. Shift clicking a curio in the inventory puts it in the first slot it fits. A slot type only shows up once some item is in its tag. The base game's one curio is the giant chestplate, a body curio that gives 20 more max health while worn, and regeneration III after 10 seconds without being hurt, so the body slot is always there. ### Making an Item a Curio Add the item to the slot type's item tag. For a ring, `tags/items/bworld/curios/ring.json` in your mod: ```json { "format_version": 1, "tag": { "values": ["jewelry:gold_ring"] } } ``` | Tag | Slot | | ------------------------- | ---------------------- | | `#bworld:curios/curio` | Any slot, and its own. | | `#bworld:curios/head` | Head | | `#bworld:curios/necklace` | Necklace | | `#bworld:curios/back` | Back | | `#bworld:curios/body` | Body | | `#bworld:curios/bracelet` | Bracelet | | `#bworld:curios/hands` | Hands | | `#bworld:curios/ring` | Ring | | `#bworld:curios/belt` | Belt | | `#bworld:curios/feet` | Feet | | `#bworld:curios/charm` | Charm | Every player has one slot of each type. Curios drop when the player dies, like the rest of what they carry. ### Attribute Modifiers An item with the `bworld:curio_modifiers` component changes the wearer's [attributes](../../docs/modding/entities/players.md#attributes) while it's in a curio slot, and says so in its tooltip. The Power Glove from Artifacts: ```json "components": { "bworld:curio_modifiers": [{ "attribute": "cubi:attack_damage", "amount": 4, "operation": "add_value" }] } ``` ### Effects When Unhurt An item with the `bworld:curio_unhurt_effect` component gives the wearer a [status effect](../../docs/modding/entities/players.md#status-effects) once they've gone `after` ticks without being hurt, and keeps it on them until they're hurt again. The giant chestplate's regeneration III after 10 seconds: ```json "components": { "bworld:curio_unhurt_effect": { "effect": "bworld:regeneration", "amplifier": 2, "after": 200 } } ``` It's given two of regeneration's heals at a time (1.2 seconds for regeneration III), so it lasts up to that long after they're hurt. A stronger one they already have, like from a potion, is left alone.