Standards 1.6.0 / MC 26.1.2
Curse Maven Snippet
What's new
Vanish can be set by another mod, under named holds
api/vanish could only ever read the state. It can now set it:
Vanish.hold(player, "storyteller:possess", true); // hide
Vanish.hold(player, "storyteller:possess", false); // release your own hold
Requested by LegendQuest's StoryTeller, whose possession feature was using spectator mode and finding it the wrong tool — a spectator flies, noclips, and has input semantics of its own that fight the feature, where a vanished player has a real grounded body a possessed creature can follow.
Named holds rather than a boolean setter. More than one thing can want somebody hidden at once,
and the loser of a plain boolean is whoever releases second: a storyteller who had already typed
/vanish before a scene would be revealed when the scene ended, undoing a choice they made. Each
caller holds under its own key and releases only its own; the player stays hidden while any hold
stands.
/vanish is itself a holder. So /vanish off during somebody else's scene releases only the
command's own hold — and says so, rather than reporting "off" while you are still invisible and
walk out in front of somebody believing otherwise.
Mobs no longer hunt a vanished player
Found by StoryTeller asking what vanish guaranteed before claiming it. Everything else was in place — hidden, unpushable, still solid, still subject to gravity — and this was not.
Both directions, because neither is enough alone. Nothing can acquire you as a target while hidden, and anything already hunting you forgets you as you vanish. Refusing new targets does nothing about the zombie already chasing you; clearing that zombie's target does nothing about it re-acquiring you a tick later.
It will not undo a blow already in flight or a creeper already lit. Vanishing is walking away from a
fight, not rewinding it. vanishTargeted turns it off.
Notes
Built for Minecraft 1.21.11, 26.1.2 and 26.2 — take the jar matching your Minecraft version.
Self-test: 535 checks, up from 522.
This mod has no additional files