Infinity Stone CoreWiki 8.0
All wikis

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

Immunities

Four abilities that make something immune to one kind of stone manipulation by others.

On this page
  1. How it works
  2. Adding one
  3. Checking for them

How it works#

Each immunity is an ability type you put in a Palladium power. Give it conditions like any ability, or none to keep it on whenever the power is there. While it's on, other players' stone abilities of that kind don't work on the entity. Its own abilities still work on itself.

infinity:mental_immunity
Mind Reading ("That mind is shielded"), Pacify, and Disguise: an immune player sees others' real skin and name.
infinity:reality_immunity
Nothing built in yet, since no Reality Stone ability targets other entities. It's there for addon abilities and commands.
infinity:soul_immunity
Soul Drain ("That soul is shielded"), being taken along by Enter / Exit Soulworld, /infinity soul locateentity, and the location line of Mind Reading.
infinity:spatial_immunity
Telekinesis and Spatial Lock can't grab or lock it (it's dropped as soon as it becomes immune), and Black Hole doesn't pull it.

The Mind Stone has mental immunity built in as a hidden passive, so anyone channeling it is immune. The Time Stone's infinity:time_immunity works the same way for Slow Time and Freeze Time.

Adding one#

The Mind Stone's

data/infinity/palladium/powers/mind_stone.json (part)
"mental_immunity": {
  "type": "infinity:mental_immunity",
  "title": "Mental Immunity",
  "hidden": true,
  "hidden_in_bar": true
}

On a toggle

Spatial immunity for the Test Stone, only while a key toggles it on.

data/infinity_test_stone/palladium/powers/test_stone.json (part)
"anchor": {
  "type": "infinity:spatial_immunity",
  "title": "Anchor",
  "description": "Telekinesis, Spatial Lock and black holes can't move you.",
  "bar_color": "pink",
  "conditions": {
    "enabling": [ { "type": "palladium:toggle" } ]
  }
}

Checking for them#

Conditions. infinity:is_mental_immune, infinity:is_reality_immune, infinity:is_soul_immune and infinity:is_spatial_immune check the entity the condition runs on, on either side. They have no settings.

JSON
{ "type": "palladium:not", "conditions": [ { "type": "infinity:is_soul_immune" } ] }

Commands. While immune, the entity has the scoreboard tag infinity_mental_immune, infinity_reality_immune, infinity_soul_immune or infinity_spatial_immune, so a selector can skip it. The Mind Stone's Pacify does exactly this:

COMMAND
execute as @e[distance=..5,tag=!infinity_mental_immune] run team join peaceful

Java. net.pugmeowla.infinity.api.InfinityImmunity has a static check for each, which works on both sides and is false for anything that isn't a living entity. isTimeImmune checks time immunity the same way.

JAVA
import net.pugmeowla.infinity.api.InfinityImmunity;

if (!InfinityImmunity.isSoulImmune(target)) {
    // Your ability's effect here.
}