
Custom Portal API Reforged
Forge port of Fabrics Custom Portal API, updated for newer versions of MC.
Обновлён 28 ноября 2025 г. · опубликован 14 августа 2023 г.
Custom Portal API Reforged
Library mod allowing developers to create portals to their custom dimensions easily. These custom portals will function exactly like nether portals, except being fully customizable. You can control the frame block, portal block, tinting, ignition source, destination, and more!
Usage
Add the repository/mod to your build.gradle.
repositories {
maven {url 'https://maven.azuredoom.com/mods'}
}
dependencies {
//1.20.1
implementation fg.deobf('net.kyrptonaught.customportalapi:customportalapi-reforged:MODVERSION')
//1.20.2+
implementation fg.deobf("net.kyrptonaught.customportalapi:cpapireforged-neo-1.20.2:MODVERSION")
}
Now onto creating and registering the portal itself, this is simple thanks to the CustomPortalBuilder class. We will make use of this in FMLCommonSetupEvent.
The following is a very simple portal that will take us to The End, and is lit by right-clicking the frame with an Eye of Ender:
CustomPortalBuilder.beginPortal()
.frameBlock(Blocks.DIAMOND_BLOCK)
.lightWithItem(Items.ENDER_EYE)
.destDimID(new ResourceLocation("the_end"))
.tintColor(45,65,101)
.registerPortal();
A Nether portal would be registered as follows:
CustomPortalBuilder.beginPortal()
.frameBlock(Blocks.OBSIDIAN)
.destDimID(new ResourceLocation("the_nether"))
.tintColor(131, 66, 184)
.registerPortal();
Some noteworthy methods to mention:
- lightWithWater/Item/Fluid - These allow you to control how the portal is lit.
- onlyLightInOverworld - Only allow the portal to be used in the overworld to your destination of choice
- flatPortal - Flat Portal similar to the End or the Twilight Forest portal.
Based off the main Fabric mod HERE and an older ported mod HERE
Версии
| Версия | Канал | Игра | Загрузчики | Дата | Скачать |
|---|---|---|---|---|---|
| 1.7.0 | Релиз | 1.21.10 | neoforge | 28 ноября 2025 г. | .jar (95 КБ) |
| 1.6.0 | Релиз | 1.21.9 | neoforge | 1 октября 2025 г. | .jar (95 КБ) |
| 1.2.2 | Релиз | 1.21.1 | neoforge | 8 июля 2025 г. | .jar (92 КБ) |
| 1.5.0 | Релиз | 1.21.6 | neoforge | 25 июня 2025 г. | .jar (94 КБ) |
| 1.4.0 | Релиз | 1.21.5 | neoforge | 21 мая 2025 г. | .jar (95 КБ) |
| 1.2.1 | Релиз | 1.21.1 | neoforge | 8 марта 2025 г. | .jar (90 КБ) |
| 1.0.11 | Релиз | 1.21.1 | neoforge | 22 ноября 2024 г. | .jar (85 КБ) |
| 1.0.10 | Релиз | 1.21.1 | neoforge | 25 сентября 2024 г. | .jar (85 КБ) |
| 1.0.8 | Релиз | 1.20.6 | neoforge | 30 июня 2024 г. | .jar (93 КБ) |
| 1.0.6 | Релиз | 1.20.4 | neoforge | 30 июня 2024 г. | .jar (95 КБ) |
| 1.0.4 | Релиз | 1.20.1 | neoforge | 30 июня 2024 г. | .jar (96 КБ) |
| 1.0.7 | Релиз | 1.20.6 | neoforge | 15 мая 2024 г. | .jar (92 КБ) |
| 1.0.6 | Релиз | 1.20.4 | neoforge | 15 мая 2024 г. | .jar (94 КБ) |
| 1.0.3 | Релиз | 1.20.1 | neoforge | 15 мая 2024 г. | .jar (105 КБ) |
| 1.0.5 | Релиз | 1.20.4 | neoforge | 8 января 2024 г. | .jar (94 КБ) |
Показаны последние 15 из 20 версий. Все версии — на Modrinth.
Ченджлог
1.7.0Релиз1.21.10 · 28 ноября 2025 г.
v1.4.0
- Ported to 1.21.10 (Thanks to AnonymousHacker1279)
1.6.0Релиз1.21.9 · 1 октября 2025 г.
v1.4.0
- Ported to 1.21.9
1.2.2Релиз1.21.1 · 8 июля 2025 г.
v1.2.2
✨ New Features
Added Ignite Events
- Implemented
PortalIgniteEventandPortalPreIgniteEventinterfaces. - Included corresponding handlers and invokers.
- 🔧 These events allow:
- Executing custom logic before and after portal ignition.
- Cancelling the ignition entirely, if desired.
- Implemented
Player Entity in Ignite Context
- The player is now included as part of the ignition source in item-use events.
- ✅ Matches upstream behavior.
- 🔍 Enables event consumers to identify which player attempted to light the portal.
⚠️ Breaking Change
- Fixed Item Usage Behavior on Failed Portal Lighting
customportalapi-reforgedpreviously cancelled item usage when ignition failed, which is opposite of upstream behavior.- This has been reversed: item usage is now only cancelled if the portal is successfully lit.
- Example: Using an Eye of Ender to light a portal will no longer cause it to fly off and possibly break—it will be consumed only when ignition succeeds.
Credit murderspagurder for this PR!
1.5.0Релиз1.21.6 · 25 июня 2025 г.
v1.4.0
- Ported to 1.21.6 - Credit to AnonymousHacker1279
1.4.0Релиз1.21.5 · 21 мая 2025 г.
v1.4.0
- Major rewrite/rework to mod for 1.21.5 as of https://github.com/AzureDoom/customportalapi-reforged/pull/25 - Credit to AnonymousHacker1279
1.2.1Релиз1.21.1 · 8 марта 2025 г.
v1.2.0
- Change registering portals to an event on the mod bus - Wolfieboy09
- Update the wiki for these changes - Wolfieboy09
- Move to RuntimeException over logging an error to get the user's attention on why it won't work - Wolfieboy09
- Code cleanup - Wolfieboy09
- Fixes portal colors.
1.0.11Релиз1.21.1 · 22 ноября 2024 г.
v1.0.11
- Fix ResourceLocationException errors - AnonymousHacker1279
1.0.10Релиз1.21.1 · 25 сентября 2024 г.
v1.0.10
- Ported to 1.21.1
- Fire post teleport event again - AnonymousHacker1279
Полная история изменений — на Modrinth.
Комментарии
Загружаем…
