![]() |
VOOZH | about |
This template is used to display the SNBT in the same format as in the game.
{{snbt| {test_tag:123b} }}
Output: {test_tag:123b}
<nowiki> tag isn't required, but it is suggested.
{{snbt|<nowiki>{test_tag:'{"text":"123"}'}</nowiki>}}
Output: {test_tag:'{"text":"123"}'}
Supports escaping:
{{snbt|<nowiki>{test_tag:"1\"2\\\"3'4\\"}</nowiki>}}
Output: {test_tag:"1\"2\\\"3'4\\"}
The |background= or |bg= can be specified to improve readability.
|background=block:
{{snbt|<nowiki>{x: 0, y: 55, z: 0, Items: [{Slot: 0b, id: "clock", Count: 1b}, {Slot: 9b, id: "written_book", Count: 1b, tag: {pages: ['{"text":"\'twas brillig and the slithy toves"}', '{"text":"Did gyre and gimble in the wabe."}', '{"text":"All mimsy were the borogoves,"}', '{"text":"And the mome raths outgrabe."}'], author: "LewisCarroll", title: "Jabberwocky"}}], id: "enderchest and "}</nowiki>|bg=block}}
{x: 0, y: 55, z: 0, Items: [{Slot: 0b, id: "clock", Count: 1b}, {Slot: 9b, id: "written_book", Count: 1b, tag: {pages: ['{"text":"\'twas brillig and the slithy toves"}', '{"text":"Did gyre and gimble in the wabe."}', '{"text":"All mimsy were the borogoves,"}', '{"text":"And the mome raths outgrabe."}'], author: "LewisCarroll", title: "Jabberwocky"}}], id: "enderchest and "}
|background=inline or |background=1:
{{snbt|<nowiki>{id: "clock", Count: 1b}</nowiki>|bg=inline}}
Output: {id: "clock", Count: 1b}
|background=table:
{|class="wikitable" | A || {{snbt|<nowiki>Id: [I;0,0,0,1]</nowiki>|bg=table}} |}
Output:
| A | Id: [I;0,0,0,1] |
Please note that the input must follow the correct SNBT format to render properly; otherwise, bugs like the following may occur:
{{snbt|<nowiki>{test_tag:"\\"\\""}</nowiki>|bg=1}}
Output: {test_tag:"\\"\\""}
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| SNBT | 1 | The SNBT would be displayed. It is suggested to add a <nowiki> tag.
| String | required |
| Background | background bg | Adds a semi-transparent background to the displayed content to make it easier to read.
| String | optional |