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
tutorial:custom_portals [2022/09/18 13:43] – [Getting Started] nexus-dinotutorial:custom_portals [2022/09/18 13:45] (current) 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 34: Line 32:
 The portals created using the CustomPortalApi act like vanilla portals, and can be as big as 23×23. The portals created using the CustomPortalApi act like vanilla portals, and can be as big as 23×23.
  
-<code java> +<code java>; 
-//  CustomPortalApiRegistry.addPortal(Block frameBlock, Identifier dimID, int r, int g, int b+ 
-CustomPortalApiRegistry.addPortal(Blocks.GOLD_BLOCKnew Identifier("my_mod_id", "my_dimension_id")234, 183, 8);+CustomPortalBuilder.beginPortal()   
 +        .frameBlock(Blocks.GOLD_BLOCK)   
 +        .lightWithItem(Items.ENDER_EYE)   
 +      //.lightWithFluid(Fluids.WATER) 
 +        .destDimID(new Identifier("my_mod_id", "my_dimension_id"))   
 +        .tintColor(234, 183, 8)   
 +        .registerPortal();
 </code> </code>
  
Line 47: Line 51:
  
 <code java> <code java>
-//  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) 
  
 CustomPortalBuilder.beginPortal()   CustomPortalBuilder.beginPortal()  
tutorial/custom_portals.txt · Last modified: 2022/09/18 13:45 by nexus-dino