Template:MC/Default data component
More actions
Template:Documentation header Template:Lua Template:Wip
Creates the list of default data components for an item, based on its ID.
Data originates from item_components/data.json.
Usage
- Template:P – the item ID, without the Template:Cd namespace. A valid ID is required.
- Template:P to Template:P – if it is one of the values below, adjust the list format. The order doesn't matter, it only needs to be between parameters 2 and 8:
- Template:Cd – All basic components appear (components that by default are all items a priori, but this can change)
- For example, Template:Cd is a basic components, as all items have it by default. However, some items have it set to 16 or 1; in these cases, Template:Cd will appear in the small list.
- The basic components are separated in a collapsed box. See Template:P.
- Template:Cd – The list is not collapsed.
- Template:Cd – Adds the Template:Cd namespace to the components.
- Template:Cd – Each component will have a link to its respective section.
- Note: Setting one of these parameters at a given moment will set it for all subsequent uses of the template on the page.
- But the parameters Template:Cd, Template:Cd, Template:Cd and Template:Cd respectively remove the effects.
- Template:Cd – All basic components appear (components that by default are all items a priori, but this can change)
- Template:P – text that appears next to empty lists or compounds.
- Template:P – text that appears next to the first line. Useful for describing the list.
- It is recommended to start with space ({{space}}).
- The final result replaces Template:Cd with the item ID (defined by Template:P)
- Template:P – text used at the end of each value, such as Template:Cd. Useful for separating lines.
- Template:P – text used at the end value (of the lists or compounds), such as Template:Cd.
- If the last component is empty, instead of just appearing as Template:Cd, it appears as Template:Cd by replacing the last occurrence of a Template:Cd (if it exists) with Template:Cd.
- Template:P – text used at the basic components box. Default Template:Cd
- If basic is Template:Cd the basic components were no longer kept in a separate box.
- Template:P – text used in the component boxes present in all items, but which for this Template:Cd has a different value from the default.
- Default Template:Cd. This means that by default the box does not exist.
- Template:P – Determines whether or not the boxes of the basic components should be collapsed. Default Template:Cd.
- Template:Cd or Template:Cd – the Template:P box will be opened.
- Template:Cd or Template:Cd – the Template:P box will be opened.
The parameters Template:P, Template:P, Template:P and Template:P are all empty by default. Setting any parameters (except Template:P) for a page template will set them for all subsequent page templates unless changed.
Examples
1. {{Default data component|redstone}} results in: Template:Default data component
2. {{Default data component|redstone|big|open|minecraft|link}} results in: Template:Default data component
3.{{Default data component|golden_spear}} results in: Template:Default data component
4.{{Default data component|golden_spear|small|collapsed|nominecraft|nolink}} results in: Template:Default data component
5.{{Default data component|golden_apple|text={{space}}list of {{cd|(%id)}} default components|basic=nil}} results in: Template:Default data component
6.{{Default data component|command_block|big|none=None'}} results in: Template:Default data component
7.{{Default data component|red_dye|text=‌ |comma=;|dot=!}} results in: Template:Default data component
8.{{Default data component|stone|basic=Common components|comma=,|dot=.|basic2=Common components2}} results in: Template:Default data component
9.{{Default data component|decorated_pot|none={{space}}none,'|basiccollapsed=3}} results in: Template:Default data component
10.{{Default data component|redstone_dust}} results in: Template:Default data component
11. In {{Default data component|redstone}}, no ID was defined (in Template:P), so it results as if it were the Template:Cd item: Template:Default data component
Template:Sandbox otherIf you're done making changes, please refresh the text.
Please add categories and interwikis to Template:MC/Default data component/doc. (View all subpages of this page.)