mirror of
https://github.com/Mojang/bedrock-samples.git
synced 2025-02-25 08:59:19 +00:00
58 lines
2.8 KiB
HTML
58 lines
2.8 KiB
HTML
<h1>ITEM DOCUMENTATION </br>Version: 1.21.20.22</h1>
|
|
This is documentation for a preview release of Minecraft. New features, components, and capabilities in this release are not final and might change without notice before the final release.<br/>Be sure to check the documentation once the release is out of preview if your add-on isn't working properly. Resource and Behavior Packs created for the preview are not guaranteed to work on the final release.<br/>
|
|
<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>
|
|
|