Loot tables
This commit is contained in:
@@ -60,7 +60,8 @@ there will be holes in the world behind them.
|
||||
| `mining.tool` | none | The [tool type](../items/tools.md) that breaks it faster, like `pickaxe`, `axe` or `shovel`. |
|
||||
| `mining.requires_tool` | `false` | Only drops when broken with `mining.tool`. |
|
||||
| `mining.tier` | `0` | With `requires_tool`, the lowest tool tier it drops for. Iron ore is `1`, so a wood pickaxe gets nothing. |
|
||||
| `drops` | nothing | The item id it drops when broken. |
|
||||
| `drops` | nothing | The item id it drops when broken, one of it. |
|
||||
| `loot_table` | none | A [loot table](../resources/loot_tables.md) it drops from when broken instead, with its states and the tool. Not with `drops`. |
|
||||
| `item` | `true` | Also register an item that places it, with the same id. To give that item more, see [Block Items](../items/index.md#block-items). |
|
||||
| `interactive` | `false` | Right clicking it does something, like opening a screen, so clients don't guess that it places a block. |
|
||||
| `replaceable` | `false` | Placing a block into it replaces it, like water. Liquids default to `true`. |
|
||||
@@ -79,8 +80,8 @@ It can't hold functions.
|
||||
Breaking takes `mining.toughness` seconds by hand. A tool whose type matches `mining.tool` breaks it `tool.speed` times
|
||||
faster. The client times breaking itself, and the server checks the result.
|
||||
|
||||
When it breaks, the block's components' `on_break` runs and it drops `drops`, unless it has `requires_tool` and the
|
||||
player's tool is the wrong type or a tier below `mining.tier`.
|
||||
When it breaks, the block's components' `on_break` runs and it drops `drops` or what its `loot_table` gives, unless it
|
||||
has `requires_tool` and the player's tool is the wrong type or a tier below `mining.tier`.
|
||||
|
||||
## Placement
|
||||
|
||||
|
||||
Reference in New Issue
Block a user