Pocket Dimension

From the Fear Nightfall wiki · Iron's Spells 'n Spellbooks

The Pocket Dimension is a private, instanced dimension added by Iron's Spells 'n Spellbooks. Each player who casts the Pocket Dimension spell gets their own small room in the dimension, reached through a pair of linked portals. The dimension is the only extra dimension in Fear Nightfall. It is sealed against most other ways of moving in and out: blocks cannot be placed inside it, and teleports into or out of it are cancelled.

Reaching the Pocket Dimension

The only way in is the Pocket Dimension spell, an Eldritch spell with a minimum rarity of Legendary. It is cast from a spell container, such as a spellbook or scroll. The spell has these values:

Property Value
School Eldritch
Minimum rarity Legendary
Maximum level 1
Mana cost 300
Cast time 40 ticks (2 seconds), not scaled by spell power
Cooldown 60 seconds

The spell cannot be cast while the player is in combat, and it cannot be cast from inside the Pocket Dimension. Casting is cancelled by the usual interruptions, such as taking damage or opening a container.

When the cast completes, the server:

  1. Creates a portal in the player's current location, which stays open for 60 seconds.
  2. Generates the player's room in the Pocket Dimension if it does not already exist.
  3. Creates a second portal in the room and moves the player through it.

Walking back through the room's portal returns the player to the overworld. Travelling through the portal is not blocked, but the portal cannot be used to re-enter immediately after the cast, because the server applies a short portal cooldown.

The dimension

The dimension uses the id irons_spellbooks:pocket_dimension. It is built as a void biome with no terrain, so the only solid structures are the player rooms.

  • Rooms. Each player is assigned a numeric id the first time they cast the spell. The room is placed at x = 0 and z = 256 × id, so rooms are 256 blocks apart along the Z axis. A room is 16 blocks wide in X and Z.
  • Bounds. Every 100 game ticks (5 seconds), the server checks each non-creative, non-spectator player in the dimension. A player who has left their 16 × 16 room is moved back to the room's portal.
  • World border. The dimension has a no-op world border, so the border does not limit movement or appear on screen.
  • Dimension type. The dimension is not natural and has no skylight, but it has a ceiling and a height of 32 blocks (Y 0 to 31). Raids do not occur, and beds and respawn anchors do not work.
  • Sky and effects. The dimension uses its own sky and cloud textures, set by a custom dimension effects class.

Because the dimension is per-player and fixed in layout, a player's room is the same each time they return to it.

Portal frames

The regular Portal Frame is an owner-restricted block that is placed by players and is tied to the owner's portals. It is crafted with the shaped recipe below, which yields 2 frames.

Mithril IngotEnder PearlMithril IngotArcane IngotArcane IngotArcane IngotArcane IngotPortal Frame2
Portal Frame · Crafting

The recipe uses two Mithril ingots, four arcane ingots and one ender pearl.

Portal frames have these rules:

  • The player who places a frame becomes its owner. Dyeing is restricted to the owner by default (portalFrameRestrictDye = true). Dye only has an effect on a frame that is part of a connected portal. A non-owner who tries to dye one receives an action-bar message and the dye is not used.
  • Breaking is not restricted by default (portalFrameRestrictBreaking = false). When the option is enabled, only the owner can break a frame.
  • Portal frames are added to the wither_immune block tag, so a Wither cannot destroy them.

Pocket Dimension Portal Frame

The Pocket Dimension Portal Frame is a separate block that appears only inside the player rooms. It has no crafting recipe.

  • It is unbreakable in survival, since its hardness is set to -1.
  • It is immune to the Wither and cannot be pushed by pistons.
  • Right-clicking it with an item does nothing special.
  • Only players can travel through it. Other entities cannot use it.

Placement and teleport restrictions

Inside the Pocket Dimension, the following blocks cannot be placed with a right click:

  • Beds (all bed blocks)
  • Respawn anchors
  • Portal Frames
  • Waystones blocks, sharestones, portstones and warp plates, if the Waystones mod is installed
  • Spatial pylons from AE2, if that mod is installed

Teleports are blocked. Any EntityTeleportEvent that happens inside the Pocket Dimension is cancelled, which includes teleports from the Iron's Spells teleport spells. The only exception is teleports caused by the /tp command. Changing dimension through a portal is a separate event and is not affected.

Notes for server owners

  • The dimension is created on demand. The first player to cast the spell causes the dimension to load.
  • The teleport and placement rules are enforced on the server, so they apply to all players.
  • Mods that add their own dimension-hopping, teleport or world-border behaviour may conflict with the Pocket Dimension rules.
  • The portal frame dye and breaking rules are set in the mod config (see above).