服务端模组,用于在运行时创建、配置并在多个自定义维度之间传送——每个世界都有独立的物品栏、游戏模式、难度、游戏规则和边界。全部通过简单的 /cw 命令完成。原版客户端可连接并使用 /cw tp,无需安装任何客户端模组。
活跃版本:1.21.1 (NeoForge / Fabric)
观看演示
功能特性
- 运行时维度创建 - 支持
NORMAL(普通)、FLAT(平坦)、NETHER(下界)或 END(末地)生成类型,可选种子。
- 按世界隔离的状态 - 每个维度均可拥有独立设置:
- 默认游戏模式(到达时应用)
- 物品栏池(与其他“共享”世界共用,或完全隔离)
- 游戏规则覆写(支持
reset 恢复原状)
- 难度(仅限自定义维度)
- 世界边界(完整兼容
/worldborder 功能)
- 公开标志 - 允许非 OP 玩家传送至此
- 智能传送 - 记住每位玩家在每个维度中的最后位置;首次访问时自动检测安全出生点(包括处理下界天花板问题)。
- 重启后持久化 - 世界数据、配置文件、玩家位置及物品栏均保存。
- 死亡重生 - 在自定义维度中死亡会在此处重生(除非你的床位于其他地方)。
- 兼容原版客户端 - 无需安装任何客户端模组。
- 删除安全机制 -
/cw delete 需要确认,执行后会清除文件及所有相关的按玩家分桶数据。
命令
所有命令均以 /cw 开头。公开命令对所有玩家可见;管理命令需具备配置的权限等级(默认为 OP 4)。
公开命令
/cw help - 列出对你可用的命令
/cw tp <world> - 传送(管理员:任意维度;玩家:仅限公开世界)
/cw list - 列出世界(按权限过滤)
管理命令 - 世界管理
/cw create <name> <type> [seed]
- 类型:
NORMAL、FLAT、NETHER、END
- 示例:
/cw create myworld NORMAL
/cw create skyblock FLAT 12345
/cw create hellscape NETHER
/cw delete <name> - 在 30 秒内通过重新运行相同命令来确认删除
管理命令 - 按世界配置(需在对应维度内执行)
/cw config - 显示当前维度的完整配置
/cw config sharedinventory <true|false> - 与其他共享世界共享物品栏,或使用完全独立的池
/cw config gamemode <survival|creative|adventure|spectator> - 进入时应用的生存模式
/cw config publicWorld <true|false> - 允许非 OP 玩家在此处使用 /cw tp
/cw config difficulty <peaceful|easy|normal|hard> - 按维度设定的难度(仅限自定义维度)
/cw config worldborder ... - 接受与原版 /worldborder 相同的参数,但应用于当前维度:
set <distance> [<time>], add <distance> [<time>]
center <x> <z>
damage amount <perBlock>, damage buffer <distance>
warning distance <blocks>, warning time <seconds>
get
/cw config gamerule [<rule> [<value>|reset]]
- 无参数:列出所有规则(被覆盖的规则以
* 标记)
<rule>:查询
<rule> <value>:为此维度覆盖该规则
<rule> reset:移除覆盖,恢复为默认值
权限
管理员命令所需的 OP 等级可在 config/<save>/serverconfig/customworlds-server.toml 中配置:
permissionLevel = 4 # 0-4,管理员命令所需的 OP 等级
maxWorlds = 0 # 0 = 无限制;/cw create 的硬上限
deleteConfirmSeconds = 30 # 5-600
/cw tp 和 /cw list 始终对所有人开放(受每个世界的 publicWorld 标志过滤)。
物品栏模型
每位玩家在每个“桶”中拥有一个物品栏快照:
- 共享桶 - 用于所有
sharedInventory = true 的维度(主世界默认共享)。所有共享世界共用同一个物品栏。
- 隔离桶 - 每个
sharedInventory = false 的维度各有一个。该维度拥有其私有的物品栏池;进出时你的共享物品栏保持不变。
桶中的数据持久化存储在磁盘上并能在重启后保留。从隔离维度登出时会立即保存你的物品栏快照。
存储
与世界数据一起保存:
| 文件 |
用途 |
customworlds.json |
已创建的世界列表 |
customworlds_config.json |
按维度配置 |
customworlds_positions.json |
按玩家、按维度的最后位置 |
customworlds_inventories/<uuid>/<bucket>.dat |
NBT 物品栏 + 经验值快照 |
dimensions/customworlds/<name>/ |
标准 MC 维度数据(区块、实体等…) |
删除世界会清除该维度上述的所有数据。此操作不可逆。
兼容性
Custom Worlds 与 Curios API (NeoForge) 和 Trinkets (Fabric) 兼容,安装这些模组后背包内容将会同步。
限制
- 每个维度的
doDaylightCycle 设置无可见效果 - 游戏时间通过 DerivedLevelData 与主世界共享。昼夜交替跟随主世界。
- 每个维度的难度 仅对
customworlds:* 维度的生效(若对 minecraft:* 维度使用会与原版全局难度冲突)。对于原版维度请使用 /difficulty 命令。
- 执行
/cw create 后建议重启服务器 - 新创建的世界在下次重启前运行于备用计时循环中,重启后将正常集成。模组会在创建时提示您。
- 动态维度注册使用了针对
MinecraftServer 内部机制的反射。更新 NeoForge 前请备份存档。
常见问题
玩家是否需要安装模组? 不需要。CustomWorlds 仅在服务端运行。原版客户端可以连接并使用 /cw tp 命令进入公共世界。
这些世界是否与原版兼容? 是的。自定义维度复用了原版的 OVERWORLD/NETHER/END 维度类型,因此原版客户端无需额外注册表数据即可识别它们。
如果玩家在删除其世界时处于离线状态,会发生什么? 重新连接后,游戏会回退到主世界出生点。玩家将携带上次退出时保存在 player.dat 中的物品栏数据出现。
我可以手动编辑 JSON 文件吗? 可以——它们是纯文本 JSON 文件。加载器对每条目的格式错误具有容错性,并会记录跳过了哪条目。
关于 Custom Worlds 我还能获得哪些帮助? 当然!欢迎加入我们的 Discord 服务器:
Server-side mod to create, configure and teleport between multiple custom dimensions at runtime - each world with its own inventory, gamemode, difficulty, gamerules and worldborder. All via simple /cw commands. Vanilla clients can connect and use /cw tp - no client install needed.
Active Versions: 1.21.1 (NeoForge / Fabric)
See it in action
Features
- Runtime dimension creation -
NORMAL, FLAT, NETHER or END generation, with optional seed.
- Per-world isolated state - every dim can have its own:
- Default gamemode (applied on arrival)
- Inventory pool (shared with other "shared" worlds, or fully isolated)
- Gamerule overrides (with
reset to revert)
- Difficulty (custom dims only)
- Worldborder (full
/worldborder feature parity)
- Public flag - let non-OP players teleport there
- Smart teleport - remembers each player's last position in every dim; safe-spawn detection on first visit (including Nether ceiling handling).
- Persistent across restarts - worlds, configs, player positions, inventories.
- Death respawn - dying in a custom dim respawns you there (unless your bed is elsewhere).
- Vanilla-client compatible - no client mod required.
- Deletion safety -
/cw delete requires confirmation, wipes files and all related per-player buckets.
Commands
All commands hang off /cw. Public commands are visible to everyone; admin commands require the configured permission level (OP 4 by default).
Public
/cw help - list commands available to you
/cw tp <world> - teleport (admins: any dim; players: public worlds only)
/cw list - list worlds (filtered by permission)
Admin - world management
/cw create <name> <type> [seed]
- Type:
NORMAL, FLAT, NETHER, END
- Examples:
/cw create myworld NORMAL
/cw create skyblock FLAT 12345
/cw create hellscape NETHER
/cw delete <name> - confirm within 30 seconds by re-running the same command
Admin - per-world config (run from inside the dim)
/cw config - show the current dimension's full config
/cw config sharedinventory <true|false> - share inventory with other shared worlds, or use a fully isolated pool
/cw config gamemode <survival|creative|adventure|spectator> - gamemode applied on arrival
/cw config publicWorld <true|false> - allow non-OP players to /cw tp here
/cw config difficulty <peaceful|easy|normal|hard> - per-dim difficulty (custom dims only)
/cw config worldborder ... - same arguments as vanilla /worldborder, but applied to the current dim:
set <distance> [<time>], add <distance> [<time>]
center <x> <z>
damage amount <perBlock>, damage buffer <distance>
warning distance <blocks>, warning time <seconds>
get
/cw config gamerule [<rule> [<value>|reset]]
- No args: list all rules (overridden ones flagged with
*)
<rule>: query
<rule> <value>: override the rule for this dim
<rule> reset: remove the override, revert to default
Permissions
The OP level required for admin commands is configurable in config/<save>/serverconfig/customworlds-server.toml:
permissionLevel = 4 # 0-4, OP level required for admin commands
maxWorlds = 0 # 0 = unlimited; hard cap for /cw create
deleteConfirmSeconds = 30 # 5-600
/cw tp and /cw list always remain available to everyone (filtered by the per-world publicWorld flag).
Inventory model
Each player has one inventory snapshot per "bucket":
- Shared bucket - used by every dim where
sharedInventory = true (the overworld is shared by default). All shared worlds use the same inventory.
- Isolated bucket - one per dim where
sharedInventory = false. The dim has its own private inventory pool; you keep your shared inventory intact when you go in and out.
Buckets persist on disk and survive restarts. Logging out from an isolated dim snapshots your inventory immediately.
Storage
Saved alongside the world data:
| File |
Purpose |
customworlds.json |
List of created worlds |
customworlds_config.json |
Per-dim config |
customworlds_positions.json |
Per-player, per-dim last positions |
customworlds_inventories/&lt;uuid&gt;/&lt;bucket&gt;.dat |
NBT inventory + XP snapshots |
dimensions/customworlds/&lt;name&gt;/ |
Standard MC dimension data (chunks, entities, …) |
Deleting a world wipes all of the above for that dim. Irreversible.
Compatibilities
Custom Worlds is compatible with Curios API (NeoForge) & Trinkets (Fabric), the inventory will sync when these mods are installed.
Limitations
doDaylightCycle per-dim has no visible effect - game time is shared with the overworld through DerivedLevelData. Day/night follows the overworld.
- Per-dim difficulty only works on
customworlds:* dims (it would conflict with vanilla's global difficulty for minecraft:* dims). For vanilla dims use /difficulty.
- Server restart recommended after
/cw create - newly-created worlds run on a fallback tick loop until the next restart, after which they integrate normally. The mod tells you so on creation.
- Dynamic dimension registration uses reflection against
MinecraftServer internals. Back up your save before updating NeoForge.
FAQ
Do my players need to install the mod? No. CustomWorlds is server-side only. Vanilla clients can connect and use /cw tp for public worlds.
Are the worlds compatible with vanilla? Yes. Custom dims reuse the vanilla OVERWORLD/NETHER/END dimension types, so vanilla clients recognize them without extra registry data.
What happens if a player is offline when their world gets deleted? On reconnect, vanilla falls back to the overworld spawn. They'll arrive with whatever inventory was saved in their player.dat at last logout.
Can I edit the JSON files manually? Yes - they're plain JSON. The loaders tolerate per-entry malformed data and log which entry was skipped.
Can I get more help about Custom Worlds ? Sure ! Join our discord at
评论 0
登录后参与评分
还没有评论,来抢沙发吧