User Tools

Site Tools


tutorial:custom_portals

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
tutorial:custom_portals [2021/12/28 18:35] – update to 1.18 bananatutorial:custom_portals [2022/09/18 13:43] – [Getting Started] nexus-dino
Line 1: Line 1:
 +FIXME //This page hasn't been updated in a while, and may not work in the future updates. //
 +
 ====== Creating a custom portal to access your dimension ====== ====== Creating a custom portal to access your dimension ======
  
Line 24: Line 26:
 </code> </code>
  
-**Note:** You need to choose the right version for your mod. The library works currently for 1.16 1.18.+**Note:** You need to choose the right version for your mod. The library works currently for 1.161.18 and 1.19.
  
 ===== Registering your Portal ===== ===== Registering your Portal =====
Line 46: Line 48:
 <code java> <code java>
 //  CustomPortalApiRegistry.addPortal(Block frameBlock, PortalIgnitionSource ignitionSource, Identifier dimID, int r, int g, int b)  //  CustomPortalApiRegistry.addPortal(Block frameBlock, PortalIgnitionSource ignitionSource, Identifier dimID, int r, int g, int b) 
-CustomPortalApiRegistry.addPortal(Blocks.NETHERITE_BLOCK, PortalIgnitionSource.FluidSource(Fluids.LAVA), new Identifier("my_mod_id", "my_dimension_id"), 51, 52, 49) +CustomPortalApiRegistry.addPortal(Blocks.NETHERITE_BLOCK, PortalIgnitionSource.FluidSource(Fluids.LAVA), new Identifier("my_mod_id", "my_dimension_id"), 51, 52, 49) 
 + 
 +CustomPortalBuilder.beginPortal()   
 +        .frameBlock(Blocks.NETHERITE_BLOCK)   
 +        .lightWithItem(Items.ENDER_EYE)   
 +      //.lightWithFluid(Fluids.WATER) 
 +        .destDimID(new Identifier("the_end"))   
 +        .tintColor(45,65,101)   
 +        .registerPortal();
 </code> </code>
  
tutorial/custom_portals.txt · Last modified: 2022/09/18 13:45 by nexus-dino