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 [2022/08/16 20:54] – FME mineblock11tutorial:custom_portals [2022/09/18 13:43] – [Getting Started] nexus-dino
Line 26: 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 48: 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