How to add a basic portal

To add a basic portal in your mod, simply call

// Sets the frame block to Diamond blocks, 
// Can use registered Block or Resource Location
// Sets the lighting item to an Ender Eye
// Can use lightWithWater() instead to use water
// Can use lightWithFluid(MyFluids.CUSTOMFLUID) instead to use a custom Fluid
// Not required, but can set a forced size of the portal
// Width, Height
.forcedSize(4, 5)
// Not required, but can set a custom Portal Block
// Not required but can change the portals return dim
// onlyIgnitInReturnDim is a boolean to make the portal ignite only in the returnDim
.returnDim(new ResourceLocation("overworld"), onlyIgnitInReturnDim)
// Not required, but can make it so it can only be ignited in the OverWorld
// Not required, but makes the portal shape use the End portal flat style instead
// Tells the portal to go the dim, in case The End
.destDimID(new ResourceLocation("the_end"))
// What RGB color to make the portal
// Registers the portal

to your mods constructor. That's it! You can see all the options CustomPortalBuilder has to offer in its source.

Last updated