本站文本内容除另有声明外,转载时均必须注明出处,并遵守CC BY-NC-SA 3.0协议。(转载须知)
本站是中文Minecraft Wiki的镜像站,与Mojang Studios、Weird Gloop没有从属关系。(免责声明)
模板:JSON
此模板使用了模块:Sprite,此脚本使用Lua编写。
更多详情,请参阅维基百科:Lua和MediaWiki:扩展:Scribunto。
The template JSON illustrates the various data types of the JSON notation that Minecraft uses for a large amount of data and can also generate symbols for folder structures. For this purpose, a corresponding symbol (sprite) is output. The template is best coupled with an unsorted list embedded in a "treeview" class for displaying data trees (see example). The data type or folder structure symbol is generated internally by the JSONsprite, for all other information see there.
For structured data in NBT format, Template:Nbt is used.
应用
{{JSON|<标签名>|显示的文字(可选)}}
实例
<div class="treeview"> * {{JSON|object}} ** {{JSON|object|pack:}} *** {{JSON|text|description:}} 资源包描述 *** {{JSON|number|pack_format:}} 资源包格式 </div>
- Lua错误 在模块:JSONSprite的第8行:attempt to call field 'getUrl' (a nil value)
- Lua错误 在模块:JSONSprite的第8行:attempt to call field 'getUrl' (a nil value)
- Lua错误 在模块:JSONSprite的第8行:attempt to call field 'getUrl' (a nil value) 资源包描述
- Lua错误 在模块:JSONSprite的第8行:attempt to call field 'getUrl' (a nil value) 资源包格式
- Lua错误 在模块:JSONSprite的第8行:attempt to call field 'getUrl' (a nil value)
参数
参数 | 意义 |
---|---|
Symbol name | The name of the symbol, either a JSON data type or a folder structure symbol (see table). |
display text | Any optional text that appears in bold text next to the icon. |
If the spelling "FOLDER" is used as symbol name, the optional text is highlighted in green. So you can highlight a folder in a folder tree.
{{JSON|folder|目录}} {{JSON|ordner|目录}}
输出:
Lua错误 在模块:JSONSprite的第8行:attempt to call field 'getUrl' (a nil value)
Lua错误 在模块:JSONSprite的第8行:attempt to call field 'getUrl' (a nil value)
All Sprites
Here you can find all kinds of sprites. Lua错误 在模块:JSONSprite的第8行:attempt to call field 'getUrl' (a nil value)
另见
{{Inventory slot}}
- Minecraft
{{BiomeSprite}}
{{BlockSprite}}
{{EffectSprite}}
{{EntitySprite}}
{{EnvSprite}}
{{ItemSprite}}
{{InvSprite}}
{{SchematicSprite}}
{{SlotSprite}}
{{AchievementSprite}}
{{NewAchievementSprite}}
- Minecraft(旧版)
- Minecraft(愚人节)
{{AprilFoolsSprite}}
- Minecraft Dungeons
{{DungeonsLevelSprite}}
{{DungeonsEffectSprite}}
{{DungeonsEmoteSprite}}
{{DungeonsEnchantmentSprite}}
{{DungeonsEntitySprite}}
{{DungeonsFlairSprite}}
{{DungeonsItemSprite}}
{{DungeonsAchievementSprite}}
{{DungeonsMiscellaneousSprite}}
- Minecraft Legends
- Minecraft Earth
- 其他
{{Sprite}}
{{CommentSprite}}
- Module:Sprite