Spelunky is © 2008, 2009 Derek Yu and Mossmouth, LLC, and is used under the [Spelunky User License v1.1b](https://spelunky.ai/LICENSE.txt). spelunky.ai is an unofficial fan project, not affiliated with or endorsed by Mossmouth. The game and its assets may not be sold.

Music by George Buzinkai and Jonathan Perry; sound effects made in SFXR. From Spelunky Classic 1.1, © 2008, 2009 Derek Yu and Mossmouth, LLC.

# Phantom Jar

From the spelunky.ai wiki: <https://spelunky.ai/wiki/phantom-jar>. Verified against the spelunky.ai port [v0.1.10](https://github.com/851-labs/spelunky/releases/tag/v0.1.10) on 28 October 2026.

The phantom Jar is a quirk of Spelunky Classic in which a Jar shot in the player's hands stays on the HUD, and switching items gives him a new one.

| Quirk     |                                                                                                                                                                                                                                                 |
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status    | GML + Oracle (the Jar); GML (the Skull)                                                                                                                                                                                                         |
| Where     | `objects/oJar/destroy.gml:30-34`                                                                                                                                                                                                                |
| Pinned by | `fidelity/replays/item-held-jar-shot.txt`                                                                                                                                                                                                       |
| Row       | [docs/quirks.md §1, Bugs and leftovers in the 1.1 source](https://github.com/851-labs/spelunky/blob/main/docs/quirks.md#1-bugs-and-leftovers-in-the-11-source): “A held Jar or Skull broken by a bullet leaves its type in the player's hands.” |

The player's hands and the item he's holding are two things to the game: the instance in his hands, and the
kind of item it remembers he's holding, which the HUD shows and the item key gives back. A bullet that breaks
a held [Jar](https://spelunky.ai/wiki/jar) or [Skull](https://spelunky.ai/wiki/skull) clears the first and, through a typo, not the second, so a new one
comes back.

## What happens

An angry [Shopkeeper](https://spelunky.ai/wiki/shopkeeper)'s shot breaks the Jar the player is holding. His hands are empty, but the
Jar stays on the HUD, and switching items gives him a [Bomb](https://spelunky.ai/wiki/bomb), a [Rope](https://spelunky.ai/wiki/rope), and then a brand-new
Jar[^1].

**Clip: A jar shot in the player's hands comes back.** An angry shopkeeper's shot breaks the jar the player is holding. His hands are empty, but the jar stays on the HUD, and switching items gives him a bomb, a rope, and then a brand-new jar. ([video](https://spelunky.ai/wiki/media/015c74cb8645abba/clips/quirks/jar-shot-in-hands/clip.mp4))

## Why

A bullet's collision with a Jar only destroys it[^2]. The
Jar's destroy event then breaks it, and, if the player held it, empties his hands[^3]:

```gml objects/oJar/destroy.gml:30-34
    if (held)
    {
        oPlayer1.holdItem = 0;
        oPlayer1.pickupItem = "";
    }
```

`objects/oJar/destroy.gml:30-34`, from `spelunky.gmk`, Spelunky Classic 1.1's source, © 2008, 2009 Derek Yu and Mossmouth, LLC ([Spelunky User License v1.1b](https://spelunky.ai/LICENSE.txt)).

The variable the player's code reads for the kind of item he holds is `pickupItemType`; `pickupItem` is a
new variable that nothing reads. The Jar's whip code, which breaks a held Jar its own way, clears the right
one[^4]. The Skull's destroy event has the same typo[^5].

So after the shot, `pickupItemType` is still "Jar": the HUD draws a Jar in the held item's box[^6], and the code that gives back the remembered item makes a new
one. The item key does, after a bomb and a rope, as it puts the rope away[^7], and so does losing a bomb or a rope from his hands, by
being stunned, killed or knocked[^8].

## Reproducing it

Carry a Jar or a Skull where an angry Shopkeeper's [Shotgun](https://spelunky.ai/wiki/shotgun) can hit it. Once a pellet breaks it, press the item key until a Jar comes round. The
replay of the clip's staged scene pins it: the shot breaks the Jar, `pickupItemType` stays "Jar", and the item
key gives a bomb, a rope and a new Jar[^9].

## In the port

The spelunky.ai port reproduces it exactly: it's in docs/quirks.md's list of the 1.1 source's bugs[^8], and the oracle's fingerprint of the replay pins the Jar's return. The Skull's version is
read in the code and not yet in a replay. No option turns it off.

## FAQ

### Why does a Jar come back after it's shot in Spelunky Classic?

The code that tidies up after a broken Jar clears a misspelt variable, so the game still remembers a Jar as the item in the player's hands. Switching items gives him a new one after the bomb and the rope.

### Does the same happen with a Skull?

Yes. The [Skull](https://spelunky.ai/wiki/skull)'s code has the same misspelling, so a Skull shot in the player's hands comes back the same way.

### How do you get a phantom Jar in Spelunky Classic?

Hold a [Jar](https://spelunky.ai/wiki/jar) while a [Shopkeeper](https://spelunky.ai/wiki/shopkeeper) shoots at the player: when a pellet breaks the Jar in his hands, press the item key until it comes round again.

## See also

- **Related:** [Jar](https://spelunky.ai/wiki/jar), [Skull](https://spelunky.ai/wiki/skull), [Shopkeeper](https://spelunky.ai/wiki/shopkeeper), [Shotgun](https://spelunky.ai/wiki/shotgun), [Bomb](https://spelunky.ai/wiki/bomb), [Rope](https://spelunky.ai/wiki/rope)

## References

[^1]: Clip quirks/jar-shot-in-hands

[^2]: `objects/oJar/collision_oBullet.gml:1`

[^3]: `objects/oJar/destroy.gml:30-34`

[^4]: `objects/oJar/collision_oWhip.gml:16-20`

[^5]: `objects/oSkull/destroy.gml:16-20`

[^6]: `scripts/scrDrawHUD.gml:79-83`

[^7]: `objects/oPlayer1/step.gml:983-991`

[^8]: Quirk 1 (docs/quirks.md)

[^9]: Replay `fidelity/replays/item-held-jar-shot.txt`

### Source code

- `objects/oJar/collision_oBullet.gml`
- `objects/oJar/destroy.gml`
- `objects/oSkull/destroy.gml`
- `objects/oPlayer1/step.gml`
