Files
spigot-base/design/user-stories/us-023-craft-pocket-base-keystone.md
T
dmg 1ad930c7ad
Release / release (push) Successful in 2m56s
CI / build (push) Successful in 1m31s
fix(pocket-base): handle keystone right-clicks in air
2026-09-06 22:14:18 -04:00

40 lines
2.6 KiB
Markdown

---
type: User Story
title: "US-023: Craft and use a Pocket Base Keystone"
description: Let Pocket Base owners craft a reusable item for instant round-trip travel between their current location and their private dimension.
status: done
---
# US-023: Craft and use a Pocket Base Keystone
As a **Pocket Base owner**, I want to craft a reusable keystone that instantly takes me into my Pocket Base and back so that I can access my private dimension without finding a portal.
## Acceptance criteria
- [x] The Pocket Base Keystone is a distinct Recovery Compass identified by persistent item metadata rather than its display name alone.
- [x] Keystone creation accepts the valid generic item metadata supplied for Recovery Compasses by the supported Purpur runtime.
- [x] Its shaped recipe places an Ender Pearl in the center, Netherite Ingots on the four cardinal slots, and Obsidian in the four corners.
- [x] Only a player who has unlocked Pocket Base I can complete the recipe or use a keystone.
- [x] Right-clicking a keystone outside a Pocket Base instantly teleports the player to their own Pocket Base arrival point.
- [x] Entering records the player's exact prior world, position, yaw, and pitch as the return destination.
- [x] Right-clicking a keystone inside the player's own Pocket Base returns them safely to the recorded destination.
- [x] Return destinations persist across logout and server restart.
- [x] Missing worlds and unsafe destinations fail safely without replacing or discarding the recorded return destination.
- [x] A keystone is reusable, has no warm-up or cooldown, and always accesses the user's own unlocked Pocket Base even when transferred between players.
- [x] Keystone travel clears accumulated fall distance and does not change existing portal travel behavior.
- [x] Automated tests cover recipe shape, crafting and use eligibility, metadata authentication, entry, return, persistence, and unavailable or unsafe destinations.
- [x] Keystone entry and return work when right-clicking air or blocks, regardless of facing direction.
- [x] Vanilla no-action events are handled without bypassing explicit item-use restrictions.
- [x] Regression tests cover air and block interactions for entry and return, and denied item use.
## Verification
- `./gradlew clean check jar` passes, including event-dispatch regression coverage for air/block entry and return and explicit item-use denial.
- Live-server verification remains pending deployment.
## Related
- [US-015: Unlock a Pocket Base](us-015-unlock-a-pocket-base.md)
- [US-016: Build and use Pocket Base portals](us-016-build-and-use-pocket-base-portals.md)