--- title: "「Minecraft」In-Game Info XML 样式" date: 2025-03-16T18:37:30Z lastmod: 2025-03-16T18:39:48Z tags: [Minecraft,模组,分享,代码片段] --- # 「Minecraft」In-Game Info XML 样式 模组本体:[In-Game Info XML](https://www.curseforge.com/minecraft/mc-mods/ingame-info-xml) 前置模组:[Lunatrius Core](https://www.curseforge.com/minecraft/mc-mods/lunatriuscore) 游戏版本:Minecraft Java Edition 正式版 1.12.2 --- ## 说明 分享一下自己在用的 In-Game Info XML Mod 的样式。 ## 使用方法 #### 方法一 1. 把代码保存为 `InGameInfo.xml`​ 文件(编码 `UTF-8`​),放入 `.minecraft/config/` 文件夹。 2. 启动游戏或直接在游戏中执行命令 `/igi reload` 进行加载。 #### 方法二 1. 把代码保存为 `文件名.xml`​ 文件(文件名自定义;编码 `UTF-8`​),放入 `.minecraft/config/` 文件夹。 2. 在游戏中执行命令 `/igi load 文件名.xml`​(`文件名` 是第 1 步中自己修改的文件名)进行加载。 ## 效果图 ![01](assets/network-asset-01-20250316183929-q7ddndl.jpg) ​![02](assets/network-asset-02-20250316183929-0ve3jsl.jpg) ​![03](assets/network-asset-03-20250316183930-36t5qzg.jpg) ​![04](assets/network-asset-04-20250316183930-29rtu13.jpg) ​![05](assets/network-asset-05-20250316183930-wyhwc0x.jpg) ​![06](assets/network-asset-06-20250316183930-ul5fv7k.jpg) ## 代码 > 若需要二次修改发布,请保留原作者信息,谢谢! ### 完整版本 ```xml 天数: $b{day}$r 时间: $b{mctime24} $a({rltime24})$r daytime $e日$r $8夜$r $e☾ {moonphase}$r raining $b☔$r thundering $b⚡$r snowing $b❄$r NE nextweatherchange ? 天气切换: $a{nextweatherchange} 群系: $a{biome} $r(温: $b{temperature} $r湿: $b{humidity}$r) slimechunk $a史莱姆区块 slimes (可生成)$f 亮度: light 7.5 $e $c light $r (视野: lighteye 7.5 $e $c lighteye $r) FPS: GT fps 60 45 30 15 0 $a $e $6 $c $4 fps 生命: $c{health} $r/ $c{maxhealth}$r 移动速度: $e{speed} 等级: $bLv.{playerlevel} $e{xpthislevel}$f / $e{xpcap}$f ($e xpthislevel xpcap 0 %$f)$r 分数: $6{score} mouseoverid 0.5 信息 mouseoverid 0.5 $e{mouseovername} mouseoverid 0.5 $a{mouseoveruniquename} $b{mouseoverid}:{mouseovermetadata} mouseoverpowerinput 0.5 $eMin: $7{mouseoverpowerweak} $aMax: $7{mouseoverpowerstrong} $bInput: $7{mouseoverpowerinput} {xi} {yi} {zi} ( EQ abrfinedirection N NE E SE S SW W NW 东北 东南 西南 西 西北 未知 ) speed 1 区块 ({chunkx}, {chunkz}) {axisdirection} mainhandicon GE mainhanddamageleft mainhandmaxdamage 50 20 10 0 $e $6 $c $4 mainhanddamageleft 0.5 {mainhanddamageleft}$f / $e{mainhandmaxdamage} mainhandname potiondurationticks0 0.5 {potionduration0} {potionicon0} potiondurationticks1 0.5 {potionduration1} {potionicon1} potiondurationticks2 0.5 {potionduration2} {potionicon2} potiondurationticks3 0.5 {potionduration3} {potionicon3} potiondurationticks4 0.5 {potionduration4} {potionicon4} potiondurationticks5 0.5 {potionduration5} {potionicon5} potiondurationticks6 0.5 {potionduration6} {potionicon6} potiondurationticks7 0.5 {potionduration7} {potionicon7} potiondurationticks8 0.5 {potionduration8} {potionicon8} GE helmetdamageleft helmetmaxdamage 50 20 10 $e $6 $c $4 helmetdamageleft 0.5 {helmetdamageleft}$f / $e{helmetmaxdamage} {helmeticon} GE chestplatedamageleft chestplatemaxdamage 50 20 10 $e $6 $c $4 chestplatedamageleft 0.5 {chestplatedamageleft}$f / $e{chestplatemaxdamage} {chestplateicon} GE leggingsdamageleft leggingsmaxdamage 50 20 10 $e $6 $c $4 leggingsdamageleft 0.5 {leggingsdamageleft}$f / $e{leggingsmaxdamage} {leggingsicon} GE bootsdamageleft bootsmaxdamage 50 20 10 $e $6 $c $4 bootsdamageleft 0.5 {bootsdamageleft}$f / $e{bootsmaxdamage} {bootsicon} nearbyplayerdistance0 0 {nearbyplayericon0} {nearbyplayername0} {nearbyplayerdistance0} Blocks nearbyplayerdistance1 0 {nearbyplayericon1} {nearbyplayername1} {nearbyplayerdistance1} Blocks nearbyplayerdistance2 0 {nearbyplayericon2} {nearbyplayername2} {nearbyplayerdistance2} Blocks nearbyplayerdistance3 0 {nearbyplayericon3} {nearbyplayername3} {nearbyplayerdistance3} Blocks ping 0.5 {ping}ms {pingicon} 检测中... ``` ### 简洁版本 ```xml mouseoverid 0.5 $e{mouseovername} mouseoverid 0.5 $a{mouseoveruniquename} $b{mouseoverid}:{mouseovermetadata} mouseoverpowerinput 0.5 $eMin: $7{mouseoverpowerweak} $aMax: $7{mouseoverpowerstrong} $bInput: $7{mouseoverpowerinput} {xi} {yi} {zi} ( EQ abrfinedirection N NE E SE S SW W NW 东北 东南 西南 西 西北 未知 ) speed 1 区块 ({chunkx}, {chunkz}) {axisdirection} ping 0.5 {ping}ms {pingicon} 检测中... ``` ‍