Custom Dimensions
Custom Dimensions 是一款完全基于服务端的 Fabric 模组,允许服务器管理员创建自定义维度、定义物理传送门框架,并通过持久化的双向网关连接各个世界。
玩家可以使用未经修改的原版客户端加入游戏。仅需服务端安装该模组和 Fabric API。
支持的 Minecraft 版本:1.21 至 1.21.11、26.1 至 26.1.2、26.2 以及 26.3。请使用与您确切的 Minecraft 版本对应的 JAR 文件。所有发行版均使用 Fabric Loader,而非 NeoForge。
模组功能
- 直接从服务端创建虚空(void)、类主世界(Overworld-style)、类下界(Nether-style)或末地(End-style)维度。模组会写入数据包定义并立即创建维度文件夹。创建后需要重启服务器,以便 Minecraft 加载新维度。
- 提供持久化的双向传送门。当玩家首次进入激活状态的传送门时,模组会查找或创建安全的目的地传送门,在必要时生成安全平台,为两个物理传送门分配唯一的 UUID,存储源端与目的地的互惠链接,并在返回行程中复用该精确的传送门对。
- 到达目的地后,完全走出目的地传送门,等待配置好的冷却时间,然后再次进入以返回。此冷却机制可防止玩家站在传送门内时瞬间弹回。传送门对按世界保存,并能在服务器重启后保留。
- 支持灵活的物理框架。使用配置的框架方块构建一个空的垂直矩形框架。默认允许的框架内部尺寸为 2x3 至 21x21 格。顶部、底部、左侧和右侧必须完整封闭。四个角落的方块是可选的。使用配置的点火器激活任意框架方块。框架可以面向 X 轴或 Z 轴方向。一个传送门定义可以激活多个物理框架,每个被激活的框架都会获得其自己的 UUID 和互惠目的地。
- 支持每个传送门的坐标缩放,范围从 0.001 到 1000.0。缩放比例为 1.0 时保持坐标不变;0.125 将主世界坐标转换为类下界的 1:8 坐标;8.0 则执行反向转换。生成的返回传送门会自动使用逆缩放比例。
- 在活动传送门内部发射彩色的服务端粉尘粒子。粒子颜色由提供给
/portal link 命令的 RGB 值决定。粒子的密度、间隔和扩散范围均可配置。由于粒子由服务端发送,玩家无需安装客户端模组。
- 提供实时的命令补全建议(TAB 键),支持已注册的方块 ID、已注册的物品 ID、当前由服务器加载的所有维度,以及来自原版、数据包、其他模组和 Custom Dimensions 提供的维度。
- 定期验证传送门框架,并停用那些框架方块被破坏的物理传送门。
- 不干扰原版传送门。在黑曜石框架上使用打火石或火球正常点火,始终会点燃原版下界传送门,即使在自定义维度内也是如此,且不会拦截末地传送门框架。若要征用黑曜石框架供 Custom Dimensions 使用,请在使用点火器时按住潜行键(Shift)。
命令
| 命令 |
描述 |
| /dimension create <name> <void|overworld|nether|end> |
创建维度定义及其文件夹,随后需要重启服务器 |
| /dimension list |
显示服务器当前加载的所有维度,并标记出自定义维度 |
| /dimension help |
显示带有示例的维度命令帮助信息 |
| /portal link <id> <frame_block> <igniter_item> <target_dimension> <RRGGBB> <light_level> [scale] |
创建或更新传送门定义 |
| /portal info <id> |
显示特定定义的目的地、框架、点火器、颜色、光照等级、缩放比例及活跃实例数量 |
| /portal list |
列出所有已保存的传送门定义及其目标和设置 |
| /portal instances |
列出已激活的物理传送门,包括其 UUID、所属维度和链接的传送门 UUID |
| /portal activate <id> <x> <y> <z> |
从控制台或命令行激活一个已完成的框架 |
| /portal delete <id> |
删除定义并停用它对应的物理传送门 |
| /portal help |
显示带有用法和示例的传送门命令帮助信息 |
/dimension create
/dimension create <name> <void|overworld|nether|end>
示例:
/dimension create pvp_arena void
这将创建 customdimensions:pvp_arena。在将其用作传送门目标之前,请重启服务器。
/portal link
/portal link <id> <frame_block> <igniter_item> <target_dimension> <RRGGBB> <light_level> [scale]
| 参数 |
含义 |
示例 |
| id |
唯一的定义名称 |
arena_gate |
| frame_block |
命名空间的框架方块 ID |
minecraft:obsidian |
| igniter_item |
用于点火的命名空间物品 ID |
minecraft:flint_and_steel |
| target_dimension |
已加载的目标维度 |
customdimensions:pvp_arena |
| RRGGBB |
六位数的粒子颜色代码 |
FF0000 |
| light_level |
保存的传送门光照值,范围 0-15 |
15 |
| scale |
可选的坐标乘数,默认为 1.0 |
0.125 |
示例:
/portal link arena_gate minecraft:obsidian minecraft:flint_and_steel customdimensions:pvp_arena FF0000 15 1.0
然后构建匹配的框架,并在任意框架方块上使用打火石时按住潜行键(Shift),因为在黑曜石上正常点火会将框架保留给原版下界传送门使用。提示:使用独特的框架方块(如哭泣的黑曜石)来建造自定义传送门,这样它们就不会与原版下界传送门冲突。
如果多个定义使用了相同的框架方块和点火器,物理点火会选择字母顺序靠前的那个定义。若需选择特定的定义,请使用 /portal activate。
兼容性说明
- 模板选择很重要。void(虚空)是一个设计上没有生物生成或结构生成的空世界。如果是生存玩法或包含 Cobblemon 等模组的内容,请使用 overworld(主世界)模板。
- 针对原版 overworld(主世界)生物群系生成的模组结构和刷怪笼会在采用 overworld 模板的维度中生成。那些硬编码检查 minecraft:overworld 维度 ID 的模组仅在原版 Overworld 中运行。如果你使用这类模组,请保持主生存世界为原版,并将自定义维度作为额外补充。
- 睡眠状态是按维度单独追踪的。同一维度内的所有玩家都必须睡觉才能跳过该维度的夜晚,其他维度的玩家不计入其中。床遵循对应维度类型的标准规则:在 void(虚空)和 overworld(主世界)维度中正常使用,在 nether(下界)维度中会爆炸,而在 end(末地)维度中无法设置重生点。如果希望单个玩家的睡眠就足以跳过夜晚,可降低 playersSleepingPercentage 游戏内规则值。
服务器配置
该模组会生成以下文件:
config/custom_dimensions.json
默认配置如下:
{
"schemaVersion": 1,
"commandPermissionLevel": 4,
"portalIgnitionPermissionLevel": 0,
"particlesPerSample": 8,
"particleIntervalTicks": 5,
"particleSpread": 0.32,
"frameDetectionRange": 21,
"frameValidationIntervalTicks": 40,
"portalCooldownTicks": 80,
"destinationSearchRadius": 16
}
配置选项
| 设置项 |
范围 |
说明 |
| schemaVersion |
1 |
配置文件格式版本,请勿更改 |
| commandPermissionLevel |
0-4 |
执行 /dimension 和 /portal 命令所需的操作员等级 |
| portalIgnitionPermissionLevel |
0-4 |
物理激活传送门框架所需的操作员等级 |
| particlesPerSample |
1-32 |
每个采样的传送门单元格产生的服务端粒子数量 |
| particleIntervalTicks |
1-20 |
粒子爆发之间的延迟,数值越低更新越频繁 |
| particleSpread |
0.0-1.0 |
每个采样位置周围的随机粒子扩散范围 |
| frameDetectionRange |
3-32 |
检测到的传送门内部最大宽度和高度 |
| frameValidationIntervalTicks |
20-1200 |
检查活动框架是否有损坏方块的频率 |
| portalCooldownTicks |
0-600 |
同一玩家再次传送前的冷却时间,20 tick 等于 1 秒 |
| destinationSearchRadius |
0-128 |
用于查找或放置可重复使用的目的地传送门的半径 |
权限等级 0 允许所有人使用。权限等级 4 需要服务器所有者或拥有 4 级操作权限的管理员。
编辑此文件后请重启服务器。无效的配置文件会被备份并替换为安全默认值。
数据文件
| 文件 |
用途 |
| config/custom_dimensions.json |
服务器权限、粒子效果、框架检测、冷却时间和放置设置 |
| config/portal_links.json |
使用 /portal link 创建的传送门定义 |
| world/data/custom_dimensions_portals.json |
已激活的物理传送门 UUID 以及双向源链接和目标链接 |
请使用命令来管理传送门定义。不建议在服务器运行时手动编辑 portal_links.json 或按世界的传送门实例文件。
示例
PvP 竞技场:
/dimension create pvp_arena void
重启服务器,然后运行:
/portal link arena_gate minecraft:obsidian minecraft:flint_and_steel customdimensions:pvp_arena FF0000 15 1.0
带有下界风格缩放比例的资源世界:
/dimension create resource_world overworld
重启服务器,然后运行:
/portal link resource_gate minecraft:iron_block minecraft:stick customdimensions:resource_world 00FF00 10 0.125
通往下界的紫色网关:
/portal link nether_gate minecraft:crying_obsidian minecraft:amethyst_shard minecraft:the_nether A020F0 15 0.125
安装
- 为你的服务器安装正确版本的 Fabric Loader。
- 安装匹配的 Fabric API。
- 将正确版本的 Custom Dimensions JAR 放入服务器 mods 文件夹。使用与你的 Minecraft 版本完全匹配的版本,并且只安装一个 Custom Dimensions JAR。
- 启动服务器一次以生成配置文件。
- 创建维度,重启服务器,定义传送门并搭建其框架。
注意事项
- 该模组仅作用于服务器端。原版客户端可以连接。
- 新创建的维度在使用传送门前需要完整重启一次服务器。
- 激活时传送门内部必须为空。
- 破坏必要的框架方块会使该物理传送门失效。
- 要使用返回功能,需离开传送门内部并在冷却时间结束后重新进入。
- 版本 1.3.1 修复了原版下界和末地传送门的兼容性问题,添加了共享 obsidian 框架时的潜行认领功能,并记录了维度模板、模组内容兼容性以及按维度睡眠的相关内容。
- 版本 1.3.0 增加了对 Minecraft 26.3 的支持,新增了 /dimension list、/dimension help、/portal info 和 /portal help 命令,优化了彩色命令输出,并为定义和实例提供了详细的多行列表显示。
Custom Dimensions
Custom Dimensions is a fully server-side Fabric mod that lets server administrators create custom dimensions, define physical portal frames, and connect worlds with persistent two-way gateways.
Players can join with an unmodified vanilla client. Only the server needs the mod and Fabric API.
Supported Minecraft versions: 1.21 through 1.21.11, 26.1 through 26.1.2, 26.2, and 26.3. Use the JAR made for your exact Minecraft version. All releases use Fabric Loader, not NeoForge.
What the mod does
- Creates void, Overworld-style, Nether-style, or End-style dimensions directly from the server. The mod writes the datapack definition and creates the dimension folder immediately. A full server restart is required after creation so Minecraft can load the new dimension.
- Provides persistent two-way portals. The first time a player enters an activated portal, the mod finds or creates a safe destination portal, creates a safety platform when necessary, gives both physical portals unique UUIDs, stores a reciprocal link between source and destination, and reuses that exact portal pair for return travel.
- After arriving, step completely out of the destination portal, wait for the configured cooldown, and enter it again to return. The cooldown prevents instant bouncing while still standing inside the portal. Portal pairs are saved per world and survive server restarts.
- Supports flexible physical frames. Build an empty vertical rectangular frame from the configured frame block. The default allowed interior is 2x3 through 21x21 blocks. The top, bottom, left side, and right side must be complete. The four corner blocks are optional. Use the configured igniter on any frame block. Frames may face either the X or Z direction. One portal definition can activate multiple physical frames, and every activated frame receives its own UUID and reciprocal destination.
- Supports per-portal coordinate scaling from 0.001 through 1000.0. A scale of 1.0 keeps the same coordinates, 0.125 converts Overworld coordinates to Nether-style 1:8 coordinates, and 8.0 performs the inverse conversion. The generated return portal automatically uses the inverse scale.
- Emits colored server-side dust particles inside active portal interiors. The particle color comes from the RGB value supplied to /portal link. Particle density, interval, and spread are configurable. Because particles are sent by the server, players do not need a client mod.
- Offers live command suggestions with TAB completion for registered block IDs, registered item IDs, every dimension currently loaded by the server, and dimensions supplied by vanilla, datapacks, other mods, and Custom Dimensions.
- Validates portal frames on a schedule and deactivates physical portals whose frame blocks were broken.
- Leaves vanilla portals alone. Normal use of flint and steel or a fire charge on an obsidian frame always ignites a vanilla Nether portal, including inside custom dimensions, and End portal frames are never intercepted. To claim an obsidian frame for Custom Dimensions instead, sneak while using the igniter.
Commands
| Command |
Description |
| /dimension create <name> <void|overworld|nether|end> |
Creates a dimension definition and its folder, then requires a server restart |
| /dimension list |
Shows every dimension currently loaded by the server, marking custom ones |
| /dimension help |
Shows dimension command help with examples |
| /portal link <id> <frame_block> <igniter_item> <target_dimension> <RRGGBB> <light_level> [scale] |
Creates or updates a portal definition |
| /portal info <id> |
Shows target, frame, igniter, color, light level, scale, and active instance count for one definition |
| /portal list |
Lists all saved portal definitions with their targets and settings |
| /portal instances |
Lists activated physical portals with their UUIDs, dimensions, and linked portal UUIDs |
| /portal activate <id> <x> <y> <z> |
Activates a completed frame from the console or command line |
| /portal delete <id> |
Deletes a definition and deactivates its physical portals |
| /portal help |
Shows portal command help with usage and examples |
/dimension create
/dimension create <name> <void|overworld|nether|end>
Example:
/dimension create pvp_arena void
This creates customdimensions:pvp_arena. Restart the server before using it as a portal target.
/portal link
/portal link <id> <frame_block> <igniter_item> <target_dimension> <RRGGBB> <light_level> [scale]
| Argument |
Meaning |
Example |
| id |
Unique definition name |
arena_gate |
| frame_block |
Namespaced frame block ID |
minecraft:obsidian |
| igniter_item |
Namespaced item ID used to ignite it |
minecraft:flint_and_steel |
| target_dimension |
Loaded destination dimension |
customdimensions:pvp_arena |
| RRGGBB |
Six-digit particle color |
FF0000 |
| light_level |
Saved portal light value from 0-15 |
15 |
| scale |
Optional coordinate multiplier, default 1.0 |
0.125 |
Example:
/portal link arena_gate minecraft:obsidian minecraft:flint_and_steel customdimensions:pvp_arena FF0000 15 1.0
Then build the matching frame and sneak while using flint and steel on any frame block, since normal ignition on obsidian reserves the frame for a vanilla Nether portal. Tip: use a distinctive frame block such as crying obsidian for custom portals so they never compete with vanilla Nether portals.
If several definitions use the same frame block and igniter, physical ignition selects the alphabetically first definition. Use /portal activate when you need to select a specific definition.
Compatibility notes
- Template choice matters. void is an empty world with no mob spawns or structure generation by design. Use the overworld template for survival gameplay or modded content such as Cobblemon.
- Modded structures and spawners that target vanilla overworld biomes generate in overworld-template dimensions. Mods that hardcode checks for the minecraft:overworld dimension ID only run in the vanilla Overworld. Keep your main survival world vanilla and use custom dimensions as extras if you use such mods.
- Sleeping is tracked per dimension. Every player inside the same dimension must sleep to skip the night there, and players in other dimensions do not count toward it. Beds follow the standard rules of the dimension type: they work in void and overworld dimensions, explode in nether dimensions, and do not set spawns in end dimensions. Lower the playersSleepingPercentage gamerule if a single sleeper should be enough.
Server configuration
The mod generates:
config/custom_dimensions.json
Default configuration:
{
"schemaVersion": 1,
"commandPermissionLevel": 4,
"portalIgnitionPermissionLevel": 0,
"particlesPerSample": 8,
"particleIntervalTicks": 5,
"particleSpread": 0.32,
"frameDetectionRange": 21,
"frameValidationIntervalTicks": 40,
"portalCooldownTicks": 80,
"destinationSearchRadius": 16
}
Configuration options
| Setting |
Range |
Description |
| schemaVersion |
1 |
Configuration format version, do not change |
| commandPermissionLevel |
0-4 |
Required operator level for /dimension and /portal commands |
| portalIgnitionPermissionLevel |
0-4 |
Required operator level to ignite a frame physically |
| particlesPerSample |
1-32 |
Number of server particles emitted for each sampled portal cell |
| particleIntervalTicks |
1-20 |
Delay between particle bursts, lower values update more often |
| particleSpread |
0.0-1.0 |
Random particle spread around each sampled position |
| frameDetectionRange |
3-32 |
Maximum detected portal interior width and height |
| frameValidationIntervalTicks |
20-1200 |
How often active frames are checked for broken blocks |
| portalCooldownTicks |
0-600 |
Delay before the same player can teleport again, 20 ticks equals 1 second |
| destinationSearchRadius |
0-128 |
Radius used to find or place a reusable destination portal |
Permission level 0 allows everyone. Permission level 4 requires a server owner or operator level 4.
Restart the server after editing this file. Invalid configuration files are backed up and replaced with safe defaults.
Data files
| File |
Purpose |
| config/custom_dimensions.json |
Server permissions, particles, frame detection, cooldown, and placement settings |
| config/portal_links.json |
Portal definitions created with /portal link |
| world/data/custom_dimensions_portals.json |
Activated physical portal UUIDs and reciprocal source and destination links |
Use the commands to manage portal definitions. Manual edits to portal_links.json or the per-world portal-instance file are not recommended while the server is running.
Examples
PvP arena:
/dimension create pvp_arena void
Restart the server, then run:
/portal link arena_gate minecraft:obsidian minecraft:flint_and_steel customdimensions:pvp_arena FF0000 15 1.0
Resource world with Nether-style scaling:
/dimension create resource_world overworld
Restart the server, then run:
/portal link resource_gate minecraft:iron_block minecraft:stick customdimensions:resource_world 00FF00 10 0.125
Purple gateway to the Nether:
/portal link nether_gate minecraft:crying_obsidian minecraft:amethyst_shard minecraft:the_nether A020F0 15 0.125
Installation
- Install the correct Fabric Loader version for your server.
- Install the matching Fabric API.
- Put the correct Custom Dimensions JAR in the server mods folder. Use the build matching your exact Minecraft version and install only one Custom Dimensions JAR.
- Start the server once to generate the configuration files.
- Create a dimension, restart the server, define a portal, and build its frame.
Notes
- The mod is server-side. Vanilla clients can connect.
- A newly created dimension requires one full server restart before portal use.
- The portal interior must be empty when activated.
- Breaking a required frame block deactivates that physical portal.
- To use the return side, leave the portal interior and re-enter after the cooldown.
- Version 1.3.1 fixes vanilla Nether and End portal compatibility, adds sneak-to-claim for shared obsidian frames, and documents dimension templates, modded content compatibility, and per-dimension sleeping.
- Version 1.3.0 added Minecraft 26.3 support, new /dimension list, /dimension help, /portal info, and /portal help commands, clearer colored command output, and detailed multi-line listings for definitions and instances.
评论 0
登录后参与评分
还没有评论,来抢沙发吧