DimSwap
Per-dimension player state for NeoForge 1.21.1 — inventory, ender chest, XP, potion effects, Curios slots. Players auto-swap state when crossing between configured dimension groups. Server-side, no client install.
About this Mod
DimSwap
Per-dimension player state isolation for NeoForge.
Save and restore inventory, ender chest, XP, potion effects, hunger, gamemode, position, and Curios slots automatically when a player crosses between configurable dimension groups.
Build a creative test world that can't leak into survival — or a hardcore zone with its own progression, or a minigame dimension with its own loadout — entirely server-side, no client mods required, no datapack hacks.
Why this exists
NeoForge has no maintained "per-dimension inventory" mod for 1.21.1. The Fabric/Paper ecosystems do (Multiverse-Inventories, EasyAuth-adjacent tools), but on NeoForge you're stuck either spinning up a second server process or accepting that creative-mode players will accidentally drop creative items into the survival world.
DimSwap solves the second case: it hooks EntityTravelToDimensionEvent to atomically save the player's full state before the cross, and PlayerChangedDimensionEvent to atomically restore the state assigned to the destination's group. First-time visits get a clean wipe so nothing carries over.
Features
- Vanilla state: main inventory + armor + offhand, ender chest, XP levels, active potion effects, food, air supply, fire ticks, gamemode, position
- Curios slots (optional dep): jetpacks, backpacks, rings, all curio slots saved and restored
- Configurable: which fields to swap, how dimensions are grouped, what commands to expose
- Atomic & defensive: failed save/restore wipes state defensively to prevent leaks; per-player NBT keeps snapshots scoped
- Custom aliases: define
/creativeand/survival(or any name) as one-shot teleport-and-swap commands - Admin tools:
/dimswap status,/dimswap reset <player> <group>,/dimswap reload
Installation
- Drop
dimswap-X.Y.Z.jarinto your server'smods/folder. - Optional: also drop on the client (only required if you want commands to autocomplete client-side; gameplay works server-only).
- Start the server once to generate
config/dimswap.json. - Edit the config to define your dimension groups (see below).
- Reload with
/dimswap reloador restart the server.
Dependencies
- Required: NeoForge 21.1+, Minecraft 1.21.1
- Optional: Curios 9.5+ — for saving/restoring Curios slots. Without Curios installed, the mod still works for vanilla state.
Configuration
config/dimswap.json:
{
"groups": {
"default": ["minecraft:overworld", "minecraft:the_nether", "minecraft:the_end"],
"creative": ["dimswap_creative:flat"]
},
"save": {
"enderChest": true,
"xp": true,
"effects": true,
"food": true,
"air": true,
"fire": true,
"health": false,
"gamemode": true,
"position": true,
"curios": true
},
"aliases": [
{"name": "creative", "dimension": "dimswap_creative:flat", "gamemode": "creative", "permissionLevel": 0},
{"name": "survival", "dimension": "minecraft:overworld", "gamemode": "survival", "permissionLevel": 0}
]
}
groups
A map of group name → list of dimension IDs. Dimensions in the same group share state. Dimensions in different groups have isolated state. Any dimension not listed falls into the default group.
save
Toggles for which player state fields to swap. health: false (default) leaves the player at their current health when crossing — flip to true if you want hardcore-style health-per-world.
aliases
Define shortcut commands. Each alias becomes a top-level command (e.g. /creative) that teleports the player to the target dimension at the target gamemode. permissionLevel: 0 means anyone can use it; 2 is op-only.
Note: aliases are registered at server startup. Adding/removing aliases requires a server restart. Changes to
groupsandsaveapply via/dimswap reload.
Commands
| Command | Permission | Description |
|---|---|---|
/dimswap go <dim> [gamemode] |
op (2) | Teleport to a dimension, optionally set gamemode |
/dimswap reload |
op (2) | Reload config from disk |
/dimswap status [player] |
op (2) | Show which groups have saved snapshots for a player |
/dimswap reset <player> <group> |
op (2) | Wipe a player's snapshot for a group |
/<alias> |
configurable | Run a configured alias (e.g. /creative, /survival) |
Caveats and known limitations
- Player must be a
ServerPlayer— client-only/integrated-server-only flows are not supported. - Riding entities: when a player changes dimensions while riding, vanilla dismounts them before the transfer. DimSwap doesn't preserve "what they were riding."
- Mod-added attachments outside Curios: if a third-party mod stores player state in its own Data Attachment or capability, DimSwap does not capture it. PRs welcome to add per-mod compat layers.
- Position memory only restores if the saved-dim matches the destination dim (sanity check). Cross-dim portal travel during a swap stays consistent.
- First visit to a group always wipes — there's no concept of "starting equipment" per group. Use a separate kit mod or vanilla loot table for first-visit gear.
Building from source
./gradlew build
# Output: build/libs/dimswap-1.0.0.jar
Requires JDK 21.
License
MIT — see LICENSE.
Credits
Created out of necessity for a small Create-mod survival server that wanted a creative testing world without inventory contamination. The architecture is intentionally simple: a save event, a restore event, and per-player NBT storage.
Available Versions
How to Install DimSwap on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set neoforge Loader
In the panel under "Egg", select the neoforge loader and matching Minecraft version (1.21.1).
Install Mod
Open the mod browser in the dashboard and search for "DimSwap". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.
Compatibility
Mod Loaders
Minecraft Versions
1.21.1
Server-side
✓ RequiredRecommended RAM
4 GB(min. 3 GB)Frequently Asked Questions
DimSwap server crashes on startup – what to do?
Most common cause: wrong neoforge version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.1). You can switch loaders with one click in the panel.
Is DimSwap compatible with neoforge?
DimSwap officially supports neoforge for Minecraft 1.21.1. The Mado dashboard automatically detects incompatible loader combinations.
Server lagging with DimSwap – how to optimize performance?
Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if DimSwap consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.
Similar Mods
Rent Modded Server
Install DimSwap with just one click on your server.