Template:Type: Difference between revisions
Jump to navigation
Jump to search
imported>LassiPulkkinen (Performace test #2) |
imported>LassiPulkkinen (Fix terminological confusion (mine).) |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[#Type:{{{1}}}|{{{1}}}]] | <includeonly>{{#switch: {{FULLPAGENAME}} | ||
| Protocol | Data types = <!-- pages that include Data types; this should work for now --> | |||
[[#Type:{{{1}}}|{{{1}}}]] | |||
| #default = | |||
[[Data types#Type:{{{1}}}|{{{1}}}]] | |||
}}</includeonly><noinclude> | |||
Generates a link to a type definition listed in [[Data types#Definitions]]. Uses a page-internal link when used in [[Protocol]] or [[Data types]]. | |||
== Usage examples == | |||
{| class="wikitable" | |||
! Wikitext | |||
! Output | |||
|- | |||
| <code><nowiki>{{Type|VarInt}} {{Type|Enum}}</nowiki></code> | |||
| {{Type|VarInt}} {{Type|Enum}} | |||
|- | |||
| <code><nowiki>{{Type|String}} (16)</nowiki></code> | |||
| {{Type|String}} (16) | |||
|- | |||
| <code><nowiki>{{Type|Array}} of {{Type|Text Component}}</nowiki></code> | |||
| {{Type|Array}} of {{Type|Text Component}} | |||
|} | |||
</noinclude> | |||
Latest revision as of 00:07, 25 February 2024
Generates a link to a type definition listed in Data types#Definitions. Uses a page-internal link when used in Protocol or Data types.
Usage examples
| Wikitext | Output | ||||
|---|---|---|---|---|---|
{{Type|VarInt}} {{Type|Enum}}
|
{{#switch: Template:Type | Data types =
VarInt |
#default =
VarInt }} {{#switch: Template:Type |
Data types =
Enum |
#default =
Enum }} |
{{Type|String}} (16)
|
{{#switch: Template:Type | Data types =
String |
#default =
String }} (16) | ||
{{Type|Array}} of {{Type|Text Component}}
|
{{#switch: Template:Type | Data types =
Array |
#default =
Array }} of {{#switch: Template:Type |
Data types =
Text Component |
#default =
Text Component }} |