Curios slots rendering !

This commit is contained in:
2026-10-01 17:57:22 -03:00
parent ea9f3f61bb
commit f2c3cb8135
39 changed files with 1032 additions and 226 deletions
+37
View File
@@ -50,6 +50,7 @@ down to 0 is gone.
| `tool` | none | Makes it a [tool](tools.md). |
| `food` | none | Makes it [edible](food.md). |
| `data_textures` | none | Other textures, picked by the stack's `data`, see below. |
| `worn` | none | How it looks worn on a player, see [below](#worn-models). |
| `components` | none | [Item components](#item-components) and their parameters. |
### Textures From Data
@@ -63,6 +64,42 @@ is out:
A stack whose `data.cast` is truthy uses `bworld:fishing_rod_cast`. When several keys are, the first listed wins.
### Worn Models
`worn` says how an item looks on a player who wears it, like Bedrock's attachables. A server script says what a player
wears with [`set_worn`](../entities/players.md#worn-items), and every client draws it on them. There's no third person
view, so players see what others wear, and what's on their own right arm in first person. Artifacts' power glove and
feral claws (`mods/artifacts`) and the base game's giant chestplate are examples.
```json
"worn": {
"model": "artifacts:power_glove_wide",
"texture": "artifacts:power_glove_wide",
"slim_model": "artifacts:power_glove_slim",
"slim_texture": "artifacts:power_glove_slim"
}
```
| Field | Meaning |
| ---------------------------- | ----------------------------------------------------------------------------------------------------- |
| `model` | An [entity model](../entities/index.md#entity-models) from a `models/*.geo.json`, made in Blockbench. |
| `texture` | The texture it's drawn with, laid out for the model's `texture_width` and `texture_height`. |
| `slim_model`, `slim_texture` | Optional, for players with slim (3 pixel wide) arms. The others when not set. |
A bone named like a part of the player, `head`, `body`, `right_arm`, `left_arm`, `right_leg` or `left_leg`, moves with
that part, so a model made over Blockbench's player template lines up. check-mods warns about a model with none of them,
since nothing of it would move. Bones under one of them go with it, and other bones stay with the body.
Things to know when making one:
- **Armor** can use a Minecraft armor texture (64x32, like `textures/entity/equipment/humanoid/` in a mod's assets) as
it is: a box over each part, inflated by 1, with the UVs of Minecraft's armor model. The giant chestplate
(`mods/bworld/models/giant_chestplate.geo.json`) is `body` at `[16, 16]` and both arms at `[40, 16]`.
- **Blockbench's `mirror` isn't supported**, so a box's texture is never flipped. Minecraft mirrors the left arm's and
leg's armor, which here show the right one's texture as it is.
- **Porting a Java mod's model**, like Artifacts' `ArmsMeshDefinitions`: Java models measure y down from the top of the
head, bedrock up from the feet. Keep x and z, and make each y `24 - y`, with a box's origin at its bottom.
## Item Components
Like [block components](../blocks/components.md), item components give items behavior. The server script registers them: