const CustomPortalBuilder = Java.loadClass(
  "net.kyrptonaught.customportalapi.api.CustomPortalBuilder"
);

StartupEvents.postInit((event) => {
  // =========================================
  // Portal to Candy Cavity Dimension
  // ========================================= 
  
  CustomPortalBuilder.beginPortal()
    ["frameBlock(net.minecraft.resources.ResourceLocation)"](
      new ResourceLocation("alexscaves", "cookie_block")
    )
    .destDimID(new ResourceLocation("generikb", "candy_cavity"))
    .lightWithItem(new ResourceLocation("farmersdelight", "hot_cocoa"))
    .tintColor(224,179,88)
    .registerPortal();
  
  
  
  // =========================================
  // Portal to Primordial Caves Dimension
  // ========================================= 
  
  CustomPortalBuilder.beginPortal()
    ["frameBlock(net.minecraft.resources.ResourceLocation)"](
      new ResourceLocation("the_bumblezone", "ancient_wax_bricks")
    )
    .destDimID(new ResourceLocation("generikb", "primordial_caves"))
    .lightWithItem(new ResourceLocation("alexscaves", "dinosaur_pottery_sherd"))
    .tintColor(22,99,37)
    .registerPortal();

  // =========================================
  // Portal to Magnetic Caves Dimension
  // =========================================

  CustomPortalBuilder.beginPortal()
    ["frameBlock(net.minecraft.resources.ResourceLocation)"](
      new ResourceLocation("alexscaves", "energized_galena_neutral")
    )
    .destDimID(new ResourceLocation("generikb", "magnetic_caves"))
    .lightWithItem(new ResourceLocation("create_sa", "copper_magnet"))
    .tintColor(230,21,21)
    .registerPortal();


  // =========================================
  // Portal to Abyssal Chasm Dimension
  // =========================================

  CustomPortalBuilder.beginPortal()
  ["frameBlock(net.minecraft.resources.ResourceLocation)"](
    new ResourceLocation("seadwellers", "depth_block")
  )
  .destDimID(new ResourceLocation("generikb", "abyssal_chasm"))
  .lightWithItem(new ResourceLocation("bca", "boiled_axolotl"))
  .tintColor(2,2,112)
  .registerPortal();

  // =========================================
  // Portal to Forlorn Hollows Dimension
  // =========================================

  CustomPortalBuilder.beginPortal()
  ["frameBlock(net.minecraft.resources.ResourceLocation)"](
    new ResourceLocation("alexscaves", "guanostone_bricks")
  )
  .destDimID(new ResourceLocation("generikb", "forlorn_hollows"))
  .lightWithItem(new ResourceLocation("minecraft", "totem_of_undying"))
  .tintColor(224,179,88)
  .registerPortal();  


  // =========================================
  // Portal to Toxic Caves Dimension
  // =========================================

  CustomPortalBuilder.beginPortal()
    ["frameBlock(net.minecraft.resources.ResourceLocation)"](
      new ResourceLocation("alexscaves", "block_of_uranium")
    )
    .destDimID(new ResourceLocation("generikb", "toxic_caves"))
    .lightWithItem(new ResourceLocation("rats", "rat_upgrade_nonbeliever"))
    .tintColor(3,252,3)
    .registerPortal();
});
