Add sell value for every block and item in the game, crazy
This commit is contained in:
@@ -61,7 +61,7 @@ there will be holes in the world behind them.
|
||||
| `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. |
|
||||
| `item` | `true` | Also register an item that places it, with the same id. |
|
||||
| `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. |
|
||||
| `place_in` | see meaning | Block ids or [tags](../resources/tags.md) it can be placed into, replacing them, like `["bworld:water"]` for rice. Air and `replaceable` blocks when not set. |
|
||||
|
||||
+35
-14
@@ -39,20 +39,20 @@ down to 0 is gone.
|
||||
|
||||
## Properties
|
||||
|
||||
| Field | Default | Meaning |
|
||||
| ----------------- | ------------------- | ----------------------------------------------------------------------------- |
|
||||
| `id` | required | The item's id. |
|
||||
| `texture` | required | The texture it's drawn with. |
|
||||
| `name` | from the id | What players see. `copper_tools:copper_ingot` is "Copper Ingot" when not set. |
|
||||
| `lore` | none | Tooltip text under the name. `\n` starts a new line. |
|
||||
| `max_stack` | `64`, `1` for tools | How many fit in one slot. |
|
||||
| `base_sell_value` | none | What one is worth when sold, a whole number of 0 or more. |
|
||||
| `places` | none | A block it places when used on a block, like seeds. |
|
||||
| `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. |
|
||||
| Field | Default | Meaning |
|
||||
| ----------------- | ------------------- | ------------------------------------------------------------------------------------ |
|
||||
| `id` | required | The item's id. |
|
||||
| `texture` | required | The texture it's drawn with. Leave it out to [fill in a block's item](#block-items). |
|
||||
| `name` | from the id | What players see. `copper_tools:copper_ingot` is "Copper Ingot" when not set. |
|
||||
| `lore` | none | Tooltip text under the name. `\n` starts a new line. |
|
||||
| `max_stack` | `64`, `1` for tools | How many fit in one slot. |
|
||||
| `base_sell_value` | none | What one is worth when sold, a whole number of 0 or more. |
|
||||
| `places` | none | A block it places when used on a block, like seeds. |
|
||||
| `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
|
||||
|
||||
@@ -101,6 +101,27 @@ Things to know when making one:
|
||||
- **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.
|
||||
|
||||
### Block Items
|
||||
|
||||
A block's item only has the block's texture and name. To give it anything else, like `lore` or `base_sell_value`, add an
|
||||
item file with the block's id and no `texture`. What it sets is added to the block's item, and the rest stays as the
|
||||
block made it.
|
||||
|
||||
`items/copper_block.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": 1,
|
||||
"item": {
|
||||
"id": "copper_tools:copper_block",
|
||||
"base_sell_value": 9
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The block has to be in the same mod and can't set `"item": false`, or `check-mods` reports an error and the game won't
|
||||
load the mod.
|
||||
|
||||
## Item Components
|
||||
|
||||
Like [block components](../blocks/components.md), item components give items behavior. The server script registers them:
|
||||
|
||||
Reference in New Issue
Block a user