Custom Portals Foxified

Custom Portals 允许你用任意方块建造传送门。匹配的框架会相互链接,实现便捷的远距离旅行。你可以在你的世界和维度中创建遍布全境的传送门网络。
本模组是 Custom Portals (Fabric) 的 NeoForge 重新实现版本。
传送门 (Portals)
使用任意实心方块构建一个矩形(近似)框架,然后用 传送门催化剂 (Portal Catalyst) 右键点击框架内部。用完全相同的方块构建第二个框架,用匹配颜色的催化剂点燃它,它们就会立即链接在一起。
- 任何方块都可以作为框架;石头、树叶、钻石块,随你喜好
- 垂直或水平的传送门均可使用,你可以将框架建在墙壁、地板、天花板上,甚至是悬浮状态
- 16 种催化剂颜色用于组织你的传送门网络
- 传送门通过匹配 颜色 + 框架材质 进行链接
- 同维度内及跨维度旅行(配合传送符文 Gate Rune)
- 拥有与原版传送门类似的彩色粒子效果和传送门特效
- Baaaahhh ?
催化剂 (Catalysts)
合成配方:4 颗末影珍珠 + 4 个末影之眼 + 1 种染料 -> 2 个传送门催化剂

催化剂也可以重新染色:任意催化剂 + 一种染料 -> 1 个新颜色的催化剂(无形状限制)。
符文 (Runes)
将符文方块放置在传送门的框架上以增强其功能。符文必须安装在直接与传送门方块相邻的方块上。
| 符文 |
效果 |
关键材料 |
| 迅捷 (Haste) |
瞬间传送(1 刻) |
羽毛、兔子脚、紫水晶碎片 |
| 传送 (Gate) |
启用跨维度链接 |
垂泪藤蔓、缠怨藤蔓、紫水晶碎片 |
| 增强器 (Enhancer) |
将链接范围增加至 1,000 格 |
青金石、紫水晶碎片 |
| 强力增强器 (Strong Enhancer) |
将链接范围增加至 10,000 格 |
海晶石、增强器符文 |
| 无限 (Infinity) |
无限制的链接范围 |
爆裂紫颂果、下界合金锭、强力增强器符文 |
没有符文的情况下,传送门在同维度内 100 格范围内自动链接。如果链接对两端的任一端装有迅捷符文,则双方均获得瞬间传送能力。
合成图片

链接 (Linking)
传送门会自动链接到最近的兼容的 未链接 传送门(相同的催化剂颜色 + 相同的框架方块)。如果一个传送门被破坏或禁用,其配对传送门将变为未链接状态,并搜索新的有效匹配对象 ?
该系统故意设计得简单且确定性强。在多人游戏或密集的同色网络中,重新链接可能会选择与你预期不同的框架。这是设计使然:放置位置/距离和布局至关重要,这支持了更具创意的传送门拓扑结构。
红石 (Redstone)
默认情况下启用红石行为:红石信号会 关闭 传送门。通电时,传送门断开链接;断电后,它将使用上述正常的链接规则自动重新链接。
由于此机制针对每个传送门独立工作,你可以禁用一对传送门中的一端,让释放出来的传送门寻找其他兼容的伙伴(如果存在)。这支持诸如 ABC 传送门切换、红石控制的旅行网络以及多人游戏的路由设置等建筑。
如果你愿意,可以在配置文件中完全禁用红石交互。
数据包 (Datapacks)
你可以使用数据包定义全新的自定义传送门。借助数据包,你可以:
- 选择传送门的 框架方块(单个方块或方块标签)和 催化剂物品
- 设置传送门的 颜色(16 种染料颜色中的任意一种)
- 选择催化剂的使用方式(消耗、损坏或未受影响)以及用量
- 使用内置传送门那样的 成对链接,或使用 缩放维度对应物 链接,后者会在目标维度自动生成另一侧(类似原版下界传送门,具有可配置的坐标缩放比例)
- 通过框架白名单/黑名单标签,或通过独占某个框架方块来限制 内置的 16 种彩色传送门
有关完整的数据包参考和现成的示例数据包,请参见 examples/。
配置 (Configuration)
所有设置均在 custom_portals_foxified-common.toml 中:
| 设置项 |
默认值 |
描述 |
maxPortalSize |
64 |
框架内可容纳的最大传送门方块数 |
minPortalSize |
1 |
框架内必须包含的最小传送门方块数 |
baseRange |
100 |
无增强符文时的链接范围 |
enhancedRange |
1,000 |
弱增强符文下的链接范围 |
strongRange |
10,000 |
强力增强符文下的链接范围 |
allowCrossDimension |
true |
传送符文是否允许跨维度链接 |
muteSounds |
false |
静音传送门环境音和传送音效 |
redstoneDisables |
true |
红石信号关闭相邻的传送门 |
与原版的差异
为什么要移植?
原版模组可与 Sinytra Connector 配合使用,但 Connector 可能会破坏其他模组并增加开销。更重要的是,原版模组使用 Mixin 重写 Minecraft 的传送序列,这可能导致与向玩家附加数据的模组发生冲突,从而引发崩溃或数据丢失。这不是原作者的错,这只是模组开发的现状。
本移植版改用 NeoForge 原生的 Portal 接口。原版 Minecraft 负责处理所有玩家数据和维度跳跃。无 Mixin,无数据丢失,因此兼容性有望更佳。
除了兼容性之外,本移植版还包含多项相较于原版模组的改进:
相较于原版模组的改进
性能
- 移除了每刻的方块实体轮询——原版模组会在每个游戏刻轮询每个传送门方块以检查状态。本移植版完全基于事件驱动(neighborChanged、链接/断开链接、符文变化)
- 无需任何方块实体——传送门状态存储在具有空间索引的世界保存数据中
兼容性
- 无 Mixin——原版模组使用 EntityMixin、ServerPlayerMixin 和 LocalPlayerMixin 来重写传送逻辑。本移植版使用 NeoForge 原生的
Portal 接口,因此原版 Minecraft 能干净地处理所有实体数据和维度转换
游戏玩法
- 移除符文会重新验证链接——在原版模组中,从跨维度配对中移除大门符文会使它们保持链接状态。本移植版会在移除符文时正确断开不兼容的链接
- 地图集成——传送门将自身位置和链接状态广播给兼容的地图/小地图模组。
- 数据包集成
私人传送门
原版模组的私人传送门功能未包含在内。该实现在多人游戏中缺乏实际意义。如果你希望与朋友一同旅行,那该怎么办?如果确实存在对传送门访问控制的需求,我可以实现它;但更合适的集成方式是与 FTB Teams 之类的模组配合。
红石模式
相较于原版模组的三种红石模式(off、on、no effect),本移植版采用一种一致的行为:通电的传送门会被禁用(默认情况下 redstoneDisables = true)。
这使传送门状态可预测,并支持实用的路由构建;有关完整行为详情,请参阅 Redstone。
兼容性
- 需要 NeoForge 1.21.1 (21.1.219+)
致谢
原版 Custom Portals 模组由 Palyon 制作(MIT 许可证)。这是对其传奇作品的 NeoForge 重新实现。
许可证
GPL-3.0-or-later
Custom Portals Foxified

Custom Portals lets you build portals out of any block. Matching frames link together and allow easy distant travel. You can create networks of portals all across your world and dimensions.
This mod is a NeoForge re-implementation of Custom Portals (Fabric).
Portals
Build a rectangular-ish frame using any solid block, then right-click the inside with a Portal Catalyst. Create a second frame out of the exact same block, light it with a matching catalyst color, and they link up instantly.
- Any block works as a frame; stone, leafs, diamond blocks, whatever you want
- Vertical or horizontal portals work, you can build frames on walls, floors, ceilings, even floating.
- 16 catalyst colors to organize your portal network
- Portals link by matching color + frame material
- Same-dimension and cross-dimension travel (with Gate Rune)
- Colored particles and portal effects just like vanilla portals
- Baaaahhh ?
Catalysts
Shaped recipe: 4 ender pearls + 4 eyes of ender + 1 dye -> 2 portal catalysts

Catalysts can also be recolored: any catalyst + a dye -> 1 catalyst of the new color (shapeless).
Runes
Place rune blocks on the portal's frame to enhance it. The rune must be mounted on a block that is directly adjacent to a portal block.
| Rune |
Effect |
Key Ingredients |
| Haste |
Instant teleportation (1 tick) |
feathers, rabbit foot, amethyst shard |
| Gate |
Enables cross-dimension linking |
weeping vines, twisting vines, amethyst shard |
| Enhancer |
Increases linking range to 1,000 blocks |
lapis lazuli, amethyst shard |
| Strong Enhancer |
Increases linking range to 10,000 blocks |
prismarine, enhancer rune |
| Infinity |
Unlimited linking range |
popped chorus fruit, netherite ingot, strong enhancer rune |
Without runes, portals link within 100 blocks in the same dimension. Haste on either end of a linked pair grants instant teleportation for both sides.
Recipe Images

Linking
Portals link automatically to the nearest compatible unlinked portal (same catalyst color + same frame block). If a portal is destroyed or disabled, its partner becomes unlinked and will search for a new valid match ?
This system is intentionally simple and deterministic. In multiplayer or dense same-color networks, relinking may choose a different frame than you expected. That is by design: placement/distance and layout matter, and it enables more creative portal topologies.
Redstone
Redstone behavior is enabled by default: a redstone signal turns off a portal. While powered, the portal unlinks; when power is removed, it automatically re-links using the normal linking rules above.
Because this works per-portal, you can disable one end of a pair and let the freed portal find a different compatible partner if one exists. This supports builds like ABC portal switching, redstone-controlled travel networks, and multiplayer routing setups.
You can disable redstone interaction entirely in config if you prefer.
Datapacks
You can define entirely new custom portals using datapacks. With datapacks, you can:
- Pick the frame block (single block or a block tag) and catalyst item for a portal
- Set the portal's color (any of the 16 dye colors)
- Choose how the catalyst is used (consumed, damaged, or untouched) and how much
- Use linked-pair linking like the built-in portals, or scaled dimension counterpart linking that auto-generates the other side in a target dimension (like vanilla nether portals, with a configurable coordinate scale)
- Restrict the built-in 16 colored portals with a frame allowlist/blocklist tag, or by claiming a frame block exclusively for a custom portal
See examples/ for the full datapack reference and ready-to-use example datapacks.
Configuration
All settings are in custom_portals_foxified-common.toml:
| Setting |
Default |
Description |
maxPortalSize |
64 |
Maximum portal blocks a frame can enclose |
minPortalSize |
1 |
Minimum portal blocks a frame must enclose |
baseRange |
100 |
Linking range with no enhancer runes |
enhancedRange |
1,000 |
Linking range with weak enhancer rune |
strongRange |
10,000 |
Linking range with strong enhancer rune |
allowCrossDimension |
true |
Whether Gate Runes can link across dimensions |
muteSounds |
false |
Mute portal ambient and teleport sounds |
redstoneDisables |
true |
Redstone signal turns off adjacent portals |
Differences from the Original
Why port?
The original mod works with Sinytra Connector, but connector can break mods and adds overhead. More importantly, the original mod uses mixins to rewrite Minecraft's teleportation sequence, which can cause crashes or data loss with mods that attach data to players. It's not the original dev's fault, it's just how modding goes.
This port uses NeoForge's native Portal interface instead. Vanilla handles all player data and dimension hopping. No mixins, no data loss, so hopefully better compatibility.
Beyond compatibility, this port also includes a number of improvements over the original:
Improvements over the original
Performance
- Removed per-tick block entity polling - the original mod ticks every portal block every game tick to check state. This port is fully event-driven (neighborChanged, link/unlink, rune changes)
- No block entity at all - portal state lives in world saved data with spatial indexing
Compatibility
- No mixins - the original mod uses EntityMixin, ServerPlayerMixin, and LocalPlayerMixin to rewrite teleportation. This port uses NeoForge's native
Portal interface so vanilla handles all entity data and dimension transitions cleanly
Gameplay
- Rune removal revalidates links - in the original, removing a gate rune from a cross-dimension pair leaves them linked. This port properly breaks incompatible links when runes are removed
- Map integration - Portals broadcast their location and link status to compatible map/minimap mods.
- Datapacks integration
No Private Portals
The original mod's private portals feature is not included. The implementation didn't make practical sense in multiplayer. If you want to travel with a friend, what happens then? If there's real demand for portal access control, I can implement it; but a proper integration would be with something like FTB Teams.
Redstone Modes
Compared to the original mod’s three redstone modes (off, on, no effect), this port uses one consistent behavior: powered portals are disabled (redstoneDisables = true by default).
This keeps portal state predictable and supports practical routing builds; see Redstone for full behavior details.
Compatibility
- Requires NeoForge 1.21.1 (21.1.219+)
Credits
Original Custom Portals mod by Palyon (MIT licensed). This is a NeoForge reimplementation of their legendary work.
License
GPL-3.0-or-later
评论 0
登录后参与评分
还没有评论,来抢沙发吧