VOOZH about

URL: https://minecraft.wiki/w/Template:Mob_icon

⇱ Template:Mob icon – Minecraft Wiki


Template:Mob icon

From Minecraft Wiki
Jump to navigation Jump to search
Documentation[view] [edit] [history] [purge]
This template uses the following TemplateStyles: Template:Mob icon/styles.css.

This template generates a mob container that displays their name and face/icon. It's primarily used in Mob page with {{Mob icon list}}, which is used to contain multiple mob icons inside.

  • |1=<mob name> – the mob's name shown under the icon.
  • |image=<path> – the mob's face image for the icon. When unspecified, it uses File:<mob name> face.png as the image file.
    • For legacy purpose, if File:<mob name>Face.png exists, it uses that instead of the current format. For newer mob face images, please use (or move to) File:<mob name> face.png format.
  • |image-size=<size> – the image's size. Its value is directly used for the image tag itself, making it equivalent to Wikitext image size. The max width for the image is 120px hard-coded in CSS.
  • |class=<image class> – specifies class for the image. There are several useful image classes you can use:
    • drop-shadow-light which adds a light drop shadow behind the image, making it stand out and more visible.
    • pixel-image removes anti aliasing for small resolution pixelated image.
  • |link=<page> – the page title where the user directs to when the mob icon is clicked. Defaults to the mob's name as the page title. When link=none is specified, it disables the link.
  • |externallink=<external page> – the external page which a new tab opens for. Overrides |link='s functionality.
  • |postfix=<postfix> – text content inserted after the mob's name. This is useful for inserting references, notes, etc.
  • |image-element=<image code> – inserts custom image element code using Wikitext syntax. This is useful for using animated images via {{Animate}}, or other custom image tags.
  • |text-nowrap=1 – forces the mob's name to unwrap. For partial unwrapping, use {{Nowrap}}.

Examples

[edit source]

A basic example using the template to produce Allay mob icon:

{{Mob icon|Allay}}

Produces

When the mob's name is specified, it gets the image from "File:<mob name> face.png", for example with Iron Golem:

{{Mob icon|Iron Golem}}
<!-- It assumes "File:Iron Golem face.png" for the mob icon's image. -->

Produces

By default, the mob icon links to an article with the same name, but you can specify the link manually with |link=:

{{Mob icon|Monster|link=Monster (entity)|image=HumanFace.png}}

Produces

Note the |link= parameter does not work with external link, for that, you'd need to use |externallink=:

{{Mob icon|Alpaca|externallink=https://en.wikipedia.org/wiki/Alpaca|image=AlpacaFace.png}}

Alternatively, you can use {{fullurl:...}} parser to get the full URL from a wiki link:

{{Mob icon|Alpaca|externallink={{fullurl:w:Alpaca}}|image=AlpacaFace.png}}
<!-- "w:" is the Wikipedia namespace from the wiki itself, used for linking to Wikipedia articles quickly -->

Produces

If you don't want to use link, you can omit it intentionally by specifying |link=none. Additionally, the |image= parameter also specifies a custom image:

{{Mob icon|Raccoon|link=none|image=RacoonFace.png}}

Produces

Raccoon

You can add custom HTML classes to the image. For example, here's one with drop-shadow-light, which adds light drop shadow behind the image:

{{Mob icon|Firefly|link=Story Mode:Firefly|image=Firefly.png|class=drop-shadow-light}}

Produces

You can add a postfix text with |postfix=, which is useful for adding extraneous information:

{{Mob icon|Pufferfish|postfix=<br>(defensive)}}

Produces

The |postfix= is also useful for adding body notes (or references):

{{Mob icon|Pigman|postfix={{note|An unimplemented mob.}}}}

Produces

  1. An unimplemented mob.

You can specify a custom image element (i.e., custom <img>...</img> tag), usually produced from templates, such as {{animate}} (which animates individual image files into a single image):

{{Mob icon|Mob|link=Mob (entity)|image-element={{animate|HumanFace.png;RanaFace.png;SteveFace.png;BlackSteveFace.png;BeastBoyFace.png|link=Mob (entity)}}}}

Produces

TemplateData

[edit source]

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
11

Specifies the mob's name.

Stringoptional
postfixpostfix

Specifies a text after the mob's name. Useful for adding a reference, note, or custom text.

Stringoptional
linklink

Specifies the mob's link. Putting "none" disables linking.

Stringoptional
imageimage

Specifies the image's file.

Fileoptional
image-sizeimage-size

Specifies custom image size. Equivalent to Wikitext image size syntax.

Stringoptional
pixel-imagepixel-image

Specifies if the image uses "pixel-image" class or not. Doesn't work when using custom image element.

Default
1
Booleanoptional
classclass

Adds additional classes to the image.

Stringoptional
image-elementimage-element

Specifies custom image element. Can be any wikitext.

Unbalanced wikitextoptional
text-nowraptext-nowrap

Specifies if the text for the mob's name should wrap or not.

Default
0
Booleanoptional
[view] [edit] [history] [purge]The above documentation is transcluded from Template:Mob icon/doc.
Retrieved from "https://minecraft.wiki/w/Template:Mob_icon?oldid=3244354"

Navigation menu