Minecraft Wiki
[voir | modifier | historique | purger]Documentation

Cette page est à traduire en Français.

This template includes a section of NBT tags which is inherited into another set. This documentation will also document the usage of the {{Arbre Nbt/Modèle}} template.


This template requires creating a couple of pages for each inherited set of tags. The Template:Nbt inherit/<id> page will use this template, and is what will actually be used by editors. The Template:Nbt inherit/<id>/template page simple transcludes the actual content to be inherited which will be loaded when clicking on the show button (this page is for technical caching reasons for the page loader script), it should contain nothing but the {{Arbre Nbt/Modèle}} template.

  • {{{1}}} is the name of the template + /template
  • {{{2}}} is the title used in the header
Template:Nbt inherit/template usage
  • {{{1}}} is the page to be transcluded
  • {{{2}}} will be used for dpl later


To inherit Format de tronçon:

Modèle:Arbre Nbt/Entité should contain
{{Arbre Nbt|Modèle:Arbre Nbt/Entité/Modèle|Tags common to all entities}}
Modèle:Arbre Nbt/Entité/Modèle should contain
{{Modèle:Arbre Nbt/Modèle|Format de tronçon/Entité|Entité}}

Then the usage in a tree which inherits it:

<div class="treeview">
* {{nbt|compound}} Entity tag
** {{Arbre Nbt/Entité}}
** Tag unique to this entity
** Another tag unique to this entity
*** {{Arbre Nbt/Objet|indent=***}}

Inherited sections can themselves inherit a section of NBT tags, simply include the inherited tags in the Template:Nbt inherit/<id> template, and pass along the {{{indent}}} parameter. Then include the #if statement on every line below the first (required because of phab:T14974). For example, the mob class inherited by mobs also inherits the tags from the entity class

Modèle:Arbre Nbt/Créature should contain
{{Arbre Nbt/entité|indent={{{indent|}}}}}
{{#if: {{{indent|}}} | {{{indent}}} | ** }}{{Nbt inherit|Template:Nbt inherit/mob/template|Tags common to all mobs}}

Then the usage in a tree which inherits it:

<div class="treeview">
* {{nbt|compound}} Entity tag
** {{Arbre Nbt/Créature}}
** Tag unique to this mob
** Another tag unique to this mob
[voir | modifier | historique | purger]La documentation ci-dessus est insérée depuis Modèle:Arbre Nbt/doc.