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

StartupEvents.postInit((event) => {
  // =========================================
  // 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(230, 21, 21)
    .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("minecraft", "heart_of_the_sea"))
  .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(2, 2, 112)
  .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("create", "experience_nugget"))
    .tintColor(261123)
    .registerPortal();
});
