Wiki 9Minecraft InGame Info XML Mod 1.12.2, Wiki

InGame Info XML Mod 1.12.2, — Guide

HUD Alignment and Positioning

The HUD is organized into nine anchor points on the screen. Each anchor can contain multiple lines of information, which are rendered relative to that position.

  • topleft: Top-left corner of the screen.
  • topcenter: Top-center, often used for compasses or day counters.
  • topright: Top-right corner, common for potion effects.
  • middleleft: Middle of the left edge.
  • middlecenter: Dead center of the screen (rarely used for text).
  • middleright: Middle of the right edge.
  • bottomleft: Bottom-left corner, above the chat.
  • bottomcenter: Bottom-center, above the hotbar.
  • bottomright: Bottom-right corner.

Users can further refine these positions using X and Y offsets in the InGameInfoXML.cfg file or the /igi config menu to prevent overlapping with other modded UI elements.

Logic and Operations

InGame Info XML supports logic tags that allow for conditional formatting. This is primarily done in the XML format using specific tags:

  • <if>: Executes a block of code only if a condition is met.
  • <equal> / <greater> / <less>: Comparison operators used within <if> tags.
  • <op>: Mathematical operations (addition, subtraction, etc.).
  • <str>: Defines a static string of text.
  • <var>: Calls one of the variables listed in the Tags section.
  • <num>: Defines a numerical value for comparisons.
  • <icon>: Displays an item or block icon (e.g., <icon>minecraft:iron_sword</icon>).

Example Logic (XML):

<if>
 <greater>
 <var>health</var>
 <num>10</num>
 </greater>
 <str>{green}{health}</str>
 <str>{red}{health} - WARNING!</str>
</if>

This example displays the player's health in green if it is above 10, and in red with a warning message if it is 10 or lower.