Infinity Stone CoreWiki 8.0
Pugmeowla

These pages are for 8.0, which isn't out yet. The version on CurseForge and Modrinth is still 7.3. Read the 7.3 docs

Custom Gauntlets

Turn an Omnitrix, an Iron Man suit or any glove into an Infinity Gauntlet with one JSON file, without the other mod knowing.

On this page
  1. How it works
  2. Worked examples
  3. Equipment
  4. Fields
  5. A placement
  6. The stone menu (gui)
  7. A slot
  8. Checking for it

How it works#

Each custom gauntlet is a file in data/infinity/gauntlets/. The file name is its ID. You describe what counts as wearing it, where each stone is drawn, and optional extras. While a player wears it, everything works like the real gauntlet:

WhatHow
Stone menuThe Open Gauntlet key (G) opens it for the gauntlet in your main hand, otherwise the worn one, so gauntlets that are never held still work. It looks like the Infinity Gauntlet's menu unless the file has a gui.
StonesAll six, and custom stones, fit. No duplicates. Item gauntlets store them on the item (they stay with it). Power gauntlets store them on the player per gauntlet ID (they come back when it's put on again).
AbilitiesWith at least one stone inserted, the player gets infinity:infinity_gauntlet, so stones are used and snapped exactly as with the real gauntlet.
LookThe other mod draws its object as usual. With a stone inserted, the optional render_layer (e.g. a glove) is drawn on top, and each stone as a small stone cube on a bone of the player model, following that arm's animation.

An Infinity Gauntlet in the off hand or Curios hands slot takes priority, then custom gauntlets in file name order.

Worked examples#

The first three are the real files from Infintrix and Infinity Protocol. Their six positions are the Infinity Gauntlet's own sockets, a good start for anything on the left hand.

Omnitrix with a glove

Infintrix's Prototype Omnitrix from Alien Evolution. While the player has the Omnitrix's power it's a gauntlet, and once a stone is in, the infintrix:prototype_infintrix glove is drawn under the stones.

data/infinity/gauntlets/prototype_omnitrix.json
{
  "name": "Prototype Omnitrix",
  "equipment": {
    "power": "alienevo:prototype_omnitrix"
  },
  "slots": [
    { "origin": [7.65, 11.75, -1.15] },
    { "origin": [7.65, 12.85, -0.55] },
    { "origin": [7.65, 11.75, 0.15] },
    { "origin": [7.65, 11.75, -2.35] },
    { "origin": [4.55, 12.15, -2.65], "slim_origin": [4.55, 12.15, -2.65], "size": [0.9, 0.9, 0.9] },
    { "origin": [7.65, 11.75, 1.45] }
  ],
  "slim_offset": [-1, 0, 0],
  "render_layer": "infintrix:prototype_infintrix",
  "powers": ["infintrix:infintrix"]
}

The glove's render layer

A normal GeckoLib Palladium render layer, with a slim arm version.

assets/infintrix/palladium/render_layers/prototype_infintrix.json
{
  "type": "geckolib:default",
  "model": {
    "normal": "infintrix:geo/prototype_infintrix.geo.json",
    "slim": "infintrix:geo/prototype_infintrix_slim.geo.json"
  },
  "texture": "infintrix:textures/models/prototype_infintrix.png",
  "bones": {
    "head": "head",
    "body": "body",
    "right_arm": "right_arm",
    "left_arm": "left_arm",
    "right_leg": "right_leg",
    "left_leg": "left_leg"
  }
}

Stones on a watch face

Infintrix's Omniverse Omnitrix has no glove. Its stones are thin slivers around the watch face, two rows of three.

data/infinity/gauntlets/omniverse_omnitrix.json
{
  "name": "Omniverse Omnitrix",
  "equipment": {
    "power": "aeo:omniverse_omnitrix"
  },
  "slots": [
    { "origin": [7.75, 16.15, -0.145], "size": [0.9, 0.25, 0.29] },
    { "origin": [7.75, 13.6, 0.288], "size": [0.9, 0.25, 0.29] },
    { "origin": [7.75, 16.15, 0.288], "size": [0.9, 0.25, 0.29] },
    { "origin": [7.75, 16.15, -0.578], "size": [0.9, 0.25, 0.29] },
    { "origin": [7.75, 13.6, -0.578], "size": [0.9, 0.25, 0.29] },
    { "origin": [7.75, 13.6, -0.145], "size": [0.9, 0.25, 0.29] }
  ],
  "slim_offset": [-1, 0, 0],
  "powers": ["infintrix:infintrix"]
}

Iron Man suit

Infinity Protocol's gauntlet for the Iron Man MK85 suit from Satsu's Iron Man Addon. Its equipment is Infinity Protocol's own power, which a tick function gives players wearing the MK85 mask while they have the IronGauntlet tag, and takes away when the tag goes. It draws the mod's infinity:nano_gauntlet_85 layer and always gives the gauntlet power.

data/infinity/gauntlets/protocol.json
{
  "name": "Protocol",
  "equipment": {
    "power": "infinity_protocol:infinity_stone_iron_man"
  },
  "slots": [
    { "origin": [7.65, 11.75, -1.15] },
    { "origin": [7.65, 13.25, -0.55] },
    { "origin": [7.65, 11.75, 0.15] },
    { "origin": [7.65, 11.75, -2.35] },
    { "origin": [4.55, 12.15, -2.65], "slim_origin": [4.55, 12.15, -2.65], "size": [0.9, 0.9, 0.9] },
    { "origin": [7.65, 11.75, 1.45] }
  ],
  "slim_offset": [-1, 0, 0],
  "render_layer": "infinity:nano_gauntlet_85",
  "powers": ["infinity:infinity_gauntlet"]
}
data/infinity_protocol/functions/tick.mcfunction
execute as @a[tag=IronGauntlet,palladium.power=satsu_iron_man_addon:iron_man/marks/mark_85/mask] run superpower add infinity_protocol:infinity_stone_iron_man @s
execute as @a[tag=!IronGauntlet,palladium.power=satsu_iron_man_addon:iron_man/marks/mark_85/mask] run superpower remove infinity_protocol:infinity_stone_iron_man @s

An item

An item gauntlet keeps its stones on the item. Here a Power Glove item from the infinity_test_stone pack counts while it's in the Curios hands slot or the off hand.

data/infinity/gauntlets/power_glove.json
{
  "name": "Power Glove",
  "equipment": { "item": "infinity_test_stone:power_glove", "slots": ["curios:hands", "offhand"] },
  "slots": [
    { "origin": [7.65, 11.75, -1.15] },
    { "origin": [7.65, 13.25, -0.55] },
    { "origin": [7.65, 11.75, 0.15] },
    { "origin": [7.65, 11.75, -2.35] },
    { "origin": [4.55, 12.15, -2.65], "size": [0.9, 0.9, 0.9] },
    { "origin": [7.65, 11.75, 1.45] }
  ],
  "slim_offset": [-1, 0, 0]
}

Equipment#

FormWorn whenStones are kept
{"item": "<id>", "slots": [...]}That item is in one of the slots: mainhand, offhand, head, chest, legs, feet, curios:<slot>, trinkets:<group/slot>. Without slots: main hand and off hand.On that item
{"power": "<id>"}The player has that power, e.g. a coupled Omnitrix (the item becomes a power while worn).On the player, per gauntlet

Fields#

KeyDefaultMeaning
nameInfinity GauntletTitle of the stone menu (text component).
equipmentrequiredSee above.
slots[]Placements, by menu slot (the Infinity Gauntlet menu's six slots are Space, Mind, Reality, Power, Time, Soul). null leaves a slot undrawn. A stone in it still works.
guithe Infinity Gauntlet's menuThe stone menu's texture and slots. See below.
slim_offset[0, 0, 0]Added to every origin for slim-armed players, usually [-1, 0, 0] on the left arm.
render_layernonePalladium render layer drawn under the stones while at least one is inserted, e.g. a glove.
render_conditions[]Palladium conditions that must all pass for the render layer and stones to be drawn (checked on the client), e.g. only during an animation.
powers[]Extra power IDs given while it's worn, with or without stones.
tooltip_itemsitems named like the powerPower gauntlets only: item IDs or #tags whose tooltip lists the viewing player's stones. Item gauntlets always show the stones they hold.

A placement#

KeyDefaultMeaning
originrequired[x, y, z] corner of the stone's cube, in Blockbench (geo) coordinates of the player model.
slim_originorigin + slim_offsetCorner for slim arms when it differs (stones on the inner side of the arm don't move).
size[1, 0.9, 0.9]Cube size in pixels.
boneleft_armPlayer bone it follows: head, body, right_arm, left_arm, right_leg, left_leg.
rotation[0, 0, 0]Degrees around the cube's center.
Finding positions

Open the other mod's model in Blockbench, find the spot on the player's arm, and copy the origin of a 1 × 0.9 × 0.9 cube there. Moving a stone to another slot in the menu moves it on the model.

The stone menu (gui)#

Without gui, a custom gauntlet uses the Infinity Gauntlet's own menu, with its texture and six stone slots. With it, the menu can look like anything and have 1 to 27 slots, each taking stones or other items.

&quot;gui&quot; in a custom gauntlet file
"gui": {
  "texture": "infinity_test_stone:textures/gui/power_glove.png",
  "size": [176, 166],
  "inventory": [8, 84],
  "title": [8, 6],
  "slots": [
    {"pos": [44, 20]},
    {"pos": [62, 20]},
    {"pos": [80, 20]},
    {"pos": [98, 20]},
    {"pos": [116, 20]},
    {"pos": [134, 20]},
    {"pos": [80, 50], "accepts": ["minecraft:nether_star", "#forge:gems/diamond"], "max_stack": 16}
  ]
}
KeyDefaultMeaning
textureinfinity:textures/gui/infinity_gauntlet.pngBackground image.
size[256, 256][width, height] of the menu: the part of the texture that's drawn (up to 1024).
texture_sizesize, at least [256, 256][width, height] of the texture file.
inventory[48, 153][x, y] of the player inventory's top left slot. The hotbar is 58 pixels below.
titlenone[x, y] to write the gauntlet's name at. Left out, there's no title.
slotsthe six stone slots1 to 27 slots, in order.

A slot#

KeyDefaultMeaning
posrequired[x, y] of the slot's top left corner, where the 16×16 item is drawn. Line it up with the slot in your texture.
accepts"stones""stones" (any Infinity Stone, custom stones included), "any", or a list of item IDs and #tags.
max_stack11 to 64. Stone slots always hold one.
  • Change the texture: set texture (and size / texture_size if it isn't 256×256), then move inventory and the slots to where your image draws them.
  • Add or remove slots: add or remove entries in slots. A slot's index is also its index in the top level slots placements, so the stone in slot 3 is drawn at placement 3.
  • Move a slot: change its pos.

A stone counts as inserted in any slot, and one stone can only be in one slot at a time. The server sends the menu to the client, so both always agree even if the client has a different copy of the file. Bad values are logged (Custom gauntlet <id>: ...) and fall back to the Infinity Gauntlet's, so a broken file never crashes the game. If a menu gets fewer slots than it had, whatever was in the removed slots is handed back the next time it's opened. Items in slots that no longer accept them stay put and can still be taken out. Nothing stored is ever deleted.

Checking for it#

Use infinity:custom_gauntlet in your own powers, optionally with gauntlet set to an ID:

JSON
{ "type": "infinity:custom_gauntlet", "gauntlet": "prototype_omnitrix" }