Improve tools system
This commit is contained in:
@@ -248,9 +248,10 @@ program**, so the server and each client can number blocks differently. Saves an
|
||||
| `light_opacity` | see meaning | `light_opacity` | How much light passing through it loses, 0-15. Defaults to `15` (blocks all light) for solid blocks and `0` otherwise. Leaves and water use `1`. |
|
||||
| `alpha` | `1` | `alpha` | Opacity for translucent blocks. |
|
||||
| `collision` | `true` | `has_collision` | Whether entities collide with it. |
|
||||
| `mining.toughness` | unbreakable | `toughness` | Seconds to break by hand. A matching tool is 2× faster. |
|
||||
| `mining.toughness` | unbreakable | `toughness` | Seconds to break by hand. A matching tool is its `tool.speed` times faster. |
|
||||
| `mining.tool` | none | `tool_to_break` | Tool type that speeds it up, like `pickaxe`, `axe` or `shovel`. |
|
||||
| `mining.requires_tool` | `false` | `requires_tool` | Only drops when broken with `mining.tool`. |
|
||||
| `mining.tier` | `0` | `tool_tier` | With `requires_tool`, the lowest `tool.tier` it drops for, like Minecraft's `incorrect_for_*_tool` tags. Iron ore is `1`, so a wood pickaxe gets nothing. |
|
||||
| `drops` | nothing | `drop_table` | Item id dropped on the ground when broken, for players to pick up. |
|
||||
| `item` | `true` | `register_block_item` | Also register an item that places this block, with the same id. |
|
||||
| `interactive` | `false` | `interactive` | Right clicking it does something (opens a screen), so clients don't guess it places a block. |
|
||||
@@ -409,10 +410,8 @@ clicked on somewhere it can go and eaten otherwise.
|
||||
"item": {
|
||||
"id": "copper_tools:copper_pickaxe",
|
||||
"texture": "copper_tools:copper_pickaxe",
|
||||
"tool": "pickaxe",
|
||||
"max_stack": 1,
|
||||
"lore": "Better than wood, worse than iron.",
|
||||
"components": { "copper_tools:durability": { "max": 250 } }
|
||||
"tool": { "type": "pickaxe", "tier": 1, "speed": 3.5, "durability": 190 },
|
||||
"lore": "Better than wood, worse than iron."
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -423,9 +422,9 @@ clicked on somewhere it can go and eaten otherwise.
|
||||
| `name` | from the id | `name` | What players see, like `"Copper Pickaxe"`. Made from the id when not set. |
|
||||
| `texture` | required | `texture_id` | Texture id. |
|
||||
| `data_textures` | none | `data_textures` | `{ "cast": "bworld:fishing_rod_cast" }`: a stack whose `data` has that key set is drawn with that texture instead, like a cast fishing rod. The first key that's set wins. |
|
||||
| `tool` | none | `tool_type` | Tool type used by blocks' `mining.tool`. |
|
||||
| `tool` | none | `tool` | Makes it a tool, like Fabric's `ToolMaterial`: `type` (matched against blocks' `mining.tool`, like `"pickaxe"`), `tier` (default `0`, see blocks' `mining.tier`), `speed` (default `2`, how many times faster than a hand) and `durability` (shown in its tooltip, nothing uses it up yet). The base game's tiers are wood and gold `0`, stone and copper `1`, iron `2`. |
|
||||
| `places` | none | `block_id` | Block placed when used on a block face. |
|
||||
| `max_stack` | `64` | new | Largest stack size. |
|
||||
| `max_stack` | `64`, `1` for tools | new | Largest stack size. |
|
||||
| `food` | none | `food` | Makes it edible: `{ "nutrition": 3, "saturation_modifier": 0.6 }`, with Minecraft's meanings (hunger points out of 20, and saturation of nutrition × modifier × 2). Optional `always_edible` (eaten even when full) and `returns` (an item left in the hand, like a bowl). Players eat it by right clicking while hungry. |
|
||||
| `lore` | none | `lore` | Tooltip text under the name. `\n` starts a new line. |
|
||||
| `components` | none | `on_create` / `get_lore` | Custom item components, handled by server scripts. |
|
||||
|
||||
Reference in New Issue
Block a user