Custom Portal API Reforged
This library provides mod developers with a simple tool for creating custom portals to user-defined dimensions. The created portals function similarly to standard Nether portals but with complete customization of all parameters: you can choose blocks for the frame and the portal itself, configure color schemes, activation methods, destination points, and much more!

Usage
To get started, add the repository and mod to your build.gradle file:
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")
}
Creating Portals
Portal creation and registration is handled through the CustomPortalBuilder class in the FMLCommonSetupEvent. Here's a simple example of a portal that transports to The End and is activated by right-clicking with an Eye of Ender on the frame:
CustomPortalBuilder.beginPortal()
.frameBlock(Blocks.DIAMOND_BLOCK)
.lightWithItem(Items.ENDER_EYE)
.destDimID(new ResourceLocation("the_end"))
.tintColor(45,65,101)
.registerPortal();
And here's how to create a standard Nether portal:
CustomPortalBuilder.beginPortal()
.frameBlock(Blocks.OBSIDIAN)
.destDimID(new ResourceLocation("the_nether"))
.tintColor(131, 66, 184)
.registerPortal();
Customization Options
The CustomPortalBuilder class contains numerous methods for fine-tuning portal functionality:
- lightWithWater/Item/Fluid - determine portal activation methods
- onlyLightInOverworld - restricts portal usage to the Overworld only
- flatPortal - creates a flat portal similar to those in The End or Twilight Forest
All methods are thoroughly documented in the source class for developer convenience.