All Mods Resource Packs Data Packs Shaders Modpacks Plugins
Custom Portal API Reforged

Custom Portal API Reforged

by AzureDoom • Downloads: 0 • Followers: 0
Description
Gallery
Changelog
Versions

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!

Some example of portals

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();
CustomPortalBuilder is filled with plenty of methods to customize the functionality of your portal, all of which are documented in the class.



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.



Credits

Based off the main Fabric mod HERE and an older ported mod HERE

All Versions

+ Add Version
Name Game version Platforms Published Downloads Actions
1.21.10
Neoforge
20h ago 1
1.21.9
Neoforge
20h ago 1
1.21.1
Neoforge
20h ago 1
1.21.6
Neoforge
20h ago 1
1.21.5
Neoforge
20h ago 1
1.21.1
Neoforge
20h ago 1
1.21.1
Neoforge
20h ago 1
1.21.1
Neoforge
20h ago 1
1.20.6
Neoforge
20h ago 1
1.20.4
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.6
Neoforge
20h ago 1
1.20.4
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.4
Neoforge
20h ago 1
1.20.4
Neoforge
20h ago 1
1.20.2
Neoforge
20h ago 1
1.20.1
Forge Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
1.20.1
Neoforge
20h ago 1
v1.4.0

  • Ported to 1.21.10 (Thanks to AnonymousHacker1279)
v1.4.0

  • Ported to 1.21.9
v1.2.2

### ✨ New Features

  • Added Ignite Events**
  • Implemented PortalIgniteEvent and PortalPreIgniteEvent interfaces.
  • Included corresponding handlers and invokers.
  • 🔧 These events allow:
  • Executing custom logic *before* and *after* portal ignition.
  • Cancelling the ignition entirely, if desired.

  • 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-reforged previously 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!
v1.4.0

  • Ported to 1.21.6 - Credit to AnonymousHacker1279
v1.4.0

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.
v1.0.11

  • Fix ResourceLocationException errors - AnonymousHacker1279
v1.0.10

  • Ported to 1.21.1
  • Fire post teleport event again - AnonymousHacker1279
v1.0.8

  • Adds min/max dim height checks for Portal generation.
  • Clean up unused code/formarted existing code.
v1.0.7

  • Adds min/max dim height checks for Portal generation.
  • Clean up unused code/formarted existing code.
v1.0.4

  • Adds min/max dim height checks for Portal generation.
  • Clean up unused code/formarted existing code.
v1.0.7

  • NeoForge 1.20.6, thanks to AnonymousHacker1279.
  • Fixes custom particles/sounds not working. Thanks AnonymousHacker1279!
v1.0.6

  • Backported Fixes custom particles/sounds not working. Thanks AnonymousHacker1279!
v1.0.3

  • Backported Fixes custom particles/sounds not working. Thanks AnonymousHacker1279!
v1.0.5

  • NeoForge Network Update, thanks to AnonymousHacker1279.
v1.0.4

  • 1.20.4 thanks to PR.
[1.0.3] 1.0.3 by AzureDoom on Oct 18, 2026
Download
v1.0.1

  • Mixin remap fix.
[1.0.2] 1.0.2 by AzureDoom on Oct 18, 2026
Download
v1.0.1

  • Mixin remap fix.
[1.0.1] 1.0.1 by AzureDoom on Oct 18, 2026
Download
v1.0.1

  • Mixin remap fix.
[1.0.0] 1.0.0 by AzureDoom on Oct 18, 2026
Download
v1.0.0

  • First Release.
Custom Portal API Reforged Icon
Download Custom Portal API Reforged
Select game version
Select platform