Template:Json ref

From Minecraft Wiki
Jump to navigation Jump to search
[view] [edit] [history] [refresh]Documentation

This template is used to represent references in json files to other registry entries. The reference can optionally also be included inline or be a reference to a tag or list.

Usage[edit source]

  • |1= is the name of the type
  • |2= is the page name to link to, defaults to the name
  • |inline= whether it is possible to inline the objects
  • |inline_type= the type of the inline object, defaults to {{nbt|compound}}
  • |tag= whether the field accepts a list or tag of objects
  • |no_single= whether the field only accepts a list or tag of objects and not a single entry

Examples[edit source]

{{json ref|type name|type link (optional)}}

One type name (an ID)

{{json ref|type name|type link (optional)|inline=1}}

One type name (an ID, or a new type name definition)

{{json ref|type name|type link (optional)|tag=1}}

One or more type name(s) (an ID, or a tag with #, or an array containing IDs)

{{json ref|type name|type link (optional)|tag=1|inline=1}}

One or more type name(s) (an ID, or a new type name definition, or a tag with #, or an array containing either IDs or new definitions in the same data type)

{{json ref|type name|type link (optional)|tag=1|inline=1|inline_type={{nbt|string}}{{nbt|compound}}}}

One or more type name(s) (an ID, or a new type name definition, or a tag with #, or an array containing either IDs or new definitions in the same data type)

{{json ref|type name|type link (optional)|no_single=1|tag=1|inline=1}}

One or more type name(s) (a tag with #, or an array containing either IDs or new definitions in the same data type)

[view] [edit] [history] [refresh]The above documentation is transcluded from Template:Json ref/doc.