Vorlage:NBT
{{#vardefine: nodoc | {{{nodoc}}} }}{{#vardefine: baddoc | {{{baddoc}}} }}{{#if: | {{#ifeq: NBT | doc | |
}} }}
{{#if: | }}{{#if: | }}
}}{{#if: | }}{{#if: | [[File:{{{image}}}|{{#if: | {{{imagesize}}} | {{#if: | 16px | 32px }} }}|text-top]] |
{{#if: Diskussion }} }}{{#if: Zum Gebrauch von Vorlagen siehe die Vorlagen-Hilfe | {{#if: Hinweis: | Zum Gebrauch von Vorlagen siehe die Vorlagen-Hilfe | Zum Gebrauch von Vorlagen siehe die Vorlagen-Hilfe }} }}
| Hinweis: | Hinweis: {{#if: |
Die Vorlage NBT veranschaulicht die verschiedenen Datentypen innerhalb der Minecraft-internen sog. NBT-Formats. Dazu wird mithilfe der Vorlage {{NBT/sprite{{#if: ||{{{2}}}{{#if: ||{{{3}}}{{#if: ||{{{4}}}{{#if: ||{{{5}}} }} }} }} }}}} ein entsprechendes Symbol ausgegeben.
Die Vorlage wird am besten mit einer unsortierten Liste gekoppelt, die in eine sog. "treeview class" (Klasse zum Anzeigen von Datenbäumen) eingebettet ist (siehe Beispiel).
Inhaltsverzeichnis
[Verbergen]Anwendung[Bearbeiten]
{{NBT|Tagname|Anzeigetext}}
Beispiel[Bearbeiten]
<div class="treeview"> * {{NBT|compound}} Der Haupttag. ** {{NBT|compound|data}}: Die Kartendaten. *** {{NBT|byte|scale}}: Wie stark die Karte gezoomt ist (Minimum: 0, Standard: 3, Maximum: 4). *** {{NBT|byte|dimension}}: 0 = [[Oberwelt]], -1 = [[Nether]], 1 = [[Ende]] *** {{NBT|short|height}}: Höhe der Karte. Standard (und einzig möglicher Wert): 128 *** {{NBT|short|width}}: Breite der Karte. Standard (und einzig möglicher Wert): 128 *** {{NBT|int|xCenter}}: Zentrum der Karte nach der echten Karte (X-Achse) *** {{NBT|int|zCenter}}: Zentrum der Karte nach der echten Karte (Z-Achse) *** {{NBT|byte-array|colors}}: Breite * Höhe Array von Farbwerten </div>
- {{#switch: compound
|int
|integer= |long= |short= |string= |compound=|byte array
|byte-array=|int array |integer-array
|int-array= |list=}}{{#if:| {{{2}}}}} Der Haupttag.
- {{#switch: compound
|int
|integer= |long= |short= |string= |compound=|byte array
|byte-array=|int array |integer-array
|int-array= |list=}}{{#if:data| data}}: Die Kartendaten.
- {{#switch: byte
|int
|integer= |long= |short= |string= |compound=|byte array
|byte-array=|int array |integer-array
|int-array= |list=}}{{#if:scale| scale}}: Wie stark die Karte gezoomt ist (Minimum: 0, Standard: 3, Maximum: 4).
- {{#switch: byte
|int
|integer= |long= |short= |string= |compound=|byte array
|byte-array=|int array |integer-array
|int-array= |list=}}{{#if:dimension| dimension}}: 0 = Oberwelt, -1 = Nether, 1 = Ende
- {{#switch: short
|int
|integer= |long= |short= |string= |compound=|byte array
|byte-array=|int array |integer-array
|int-array= |list=}}{{#if:height| height}}: Höhe der Karte. Standard (und einzig möglicher Wert): 128
- {{#switch: short
|int
|integer= |long= |short= |string= |compound=|byte array
|byte-array=|int array |integer-array
|int-array= |list=}}{{#if:width| width}}: Breite der Karte. Standard (und einzig möglicher Wert): 128
- {{#switch: int
|int
|integer= |long= |short= |string= |compound=|byte array
|byte-array=|int array |integer-array
|int-array= |list=}}{{#if:xCenter| xCenter}}: Zentrum der Karte nach der echten Karte (X-Achse)
- {{#switch: int
|int
|integer= |long= |short= |string= |compound=|byte array
|byte-array=|int array |integer-array
|int-array= |list=}}{{#if:zCenter| zCenter}}: Zentrum der Karte nach der echten Karte (Z-Achse)
- {{#switch: byte-array
|int
|integer= |long= |short= |string= |compound=|byte array
|byte-array=|int array |integer-array
|int-array= |list=}}{{#if:colors| colors}}: Breite * Höhe Array von Farbwerten
Parameter[Bearbeiten]
Tagname
bezeichnet den Datentyp, der angezeigt werden soll (siehe Tabelle).
Anzeigetext
ist ein beliebiger optionaler Text, der neben dem Symbol ausgegeben wird.
Verfügbare Symbole[Bearbeiten]
Jedem internen Datentyp ist ein Symbol zugeordnet. Für manche Symbole existieren mehrere Namen (siehe Tabelle).
Icon | Tag name(s) | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{#switch: byte | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || byte |
{{#switch: short | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || short |
{{#switch: int | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || int |
{{#switch: long | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || long |
{{#switch: float | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || float |
{{#switch: double | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || double |
{{#switch: byte array | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || byte array |
{{#switch: string | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || string |
{{#switch: list | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || list |
{{#switch: compound | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || compound |
{{#switch: int array | byte= | double= | float= | int | integer= | long= | short= | string= | compound= | byte array | byte-array= | int array | integer-array | int-array= | list=
}}{{#if:| {{{2}}}}} || int array |
Siehe auch[Bearbeiten]
Dies ist die Dokumentation und wird auf der Vorlagenseite eingebunden.
|Die obige Dokumentation ist unter Vorlage:NBT/doc zu finden. (Bearbeiten | Versionsgeschichte)
}}