mirror of
https://github.com/Mojang/bedrock-samples.git
synced 2024-11-23 11:16:14 +00:00
57 lines
2.4 KiB
HTML
57 lines
2.4 KiB
HTML
<h1>ITEM DOCUMENTATION </br>Version: 1.21.40.3</h1>
|
|
<h2><p id="Index">Index</p></h2>
|
|
<table border="1">
|
|
<tr> <th><a href="#Items">Items</a></th> </tr>
|
|
<tr> <td> <a href="#Item Definition Properties"> Item Definition Properties</a> </tr> </td>
|
|
</table>
|
|
<a href="#Index">Back to top</a>
|
|
<h1><p id="Items">Items</p></h1>
|
|
|
|
Items are defined in a JSON file inside a behavior pack.</br>All attributes, including item names, must be defined using item components.</br><h1><p id="Item Definition Properties">Item Definition Properties</p></h1>
|
|
|
|
Properties are part of the Item Definition. They help the system determine how to parse and initialize the item.</br><h2></h2>
|
|
|
|
<table border="1" style="width:100%; border-style:solid; border-collapse:collapse; border-width:3;">
|
|
<tr> <th style="border-style:solid; border-width:3;">Name</th> <th style="border-style:solid; border-width:3;">Type</th> <th style="border-style:solid; border-width:3;">Default Value</th> <th style="border-style:solid; border-width:3;">Description</th> </tr>
|
|
<tr>
|
|
<td style="border-style:solid; border-width:3; padding:7px">format_version</td>
|
|
<td style="border-style:solid; border-width:3; padding:7px"></td>
|
|
<td style="border-style:solid; border-width:3; padding:7px"></td>
|
|
<td style="border-style:solid; border-width:3; padding:7px">Specifies the version of the game this entity was made in. If the version is lower than the current version, any changes made to the entity in the vanilla version will be applied to it.</br></td>
|
|
</tr>
|
|
<tr>
|
|
<td style="border-style:solid; border-width:3; padding:7px">minecraft:item</td>
|
|
<td style="border-style:solid; border-width:3; padding:7px"></td>
|
|
<td style="border-style:solid; border-width:3; padding:7px"></td>
|
|
<td style="border-style:solid; border-width:3; padding:7px">Item definition includes the "description" and "components" sections.</br></td>
|
|
</tr>
|
|
</table>
|
|
<h2>Code Example</h2>
|
|
Example<br / ><textarea readonly="true" cols="42" rows="22">
|
|
{
|
|
"format_version": "1.20.20",
|
|
"minecraft:item": {
|
|
"description": {
|
|
"identifier": "minecraft:blaze_rod"
|
|
},
|
|
"components": {
|
|
"minecraft:fuel": {
|
|
"duration": 120.0
|
|
},
|
|
"minecraft:max_stack_size": 64,
|
|
"minecraft:icon": {
|
|
"texture": "blaze_rod"
|
|
},
|
|
"minecraft:hand_equipped": true,
|
|
"minecraft:display_name": {
|
|
"value": "Blaze Rod"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</textarea> </br>
|
|
<a href="#Index">Back to top</a><br><br>
|
|
|
|
<br><br>
|
|
|