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

StartupEvents.postInit(event => {

  // Abyssal Chasm Portal
  CustomPortalBuilder.beginPortal()
    ["frameBlock(net.minecraft.resources.ResourceLocation)"](new ResourceLocation("minecraft", "sea_lantern"))
    .destDimID(new ResourceLocation("nostalgic", "abyssal_chasm"))
    .lightWithItem(new ResourceLocation("ars_nouveau", "water_essence"))
    .tintColor(40, 60, 180)
    .registerPortal();

  // Candy Cavity Portal
  CustomPortalBuilder.beginPortal()
    ["frameBlock(net.minecraft.resources.ResourceLocation)"](new ResourceLocation("minecraft", "pink_wool"))
    .destDimID(new ResourceLocation("nostalgic", "candy_cavity"))
    .lightWithItem(new ResourceLocation("industrialforegoing", "pink_slime"))
    .tintColor(255, 160, 240)
    .registerPortal();

  // Forlorn Hollows Portal
  CustomPortalBuilder.beginPortal()
    ["frameBlock(net.minecraft.resources.ResourceLocation)"](new ResourceLocation("minecraft", "soul_sand"))
    .destDimID(new ResourceLocation("nostalgic", "forlorn_hollows"))
    .lightWithItem(new ResourceLocation("alexscaves", "pewen_sap"))
    .tintColor(80, 80, 80)
    .registerPortal();

  // Magnetic Cave Portal
  CustomPortalBuilder.beginPortal()
    ["frameBlock(net.minecraft.resources.ResourceLocation)"](new ResourceLocation("minecraft", "polished_deepslate"))
    .destDimID(new ResourceLocation("nostalgic", "magnetic_cave"))
    .lightWithItem(new ResourceLocation("botania", "manasteel_ingot"))
    .tintColor(255, 0, 0)
    .registerPortal();

  // Primordial Cave Portal
  CustomPortalBuilder.beginPortal()
    ["frameBlock(net.minecraft.resources.ResourceLocation)"](new ResourceLocation("minecraft", "mossy_stone_bricks"))
    .destDimID(new ResourceLocation("nostalgic", "primordial_cave"))
    .lightWithItem(new ResourceLocation("minecraft", "amethyst_shard"))
    .tintColor(255, 190, 80)
    .registerPortal();

  // Toxic Cave Portal
  CustomPortalBuilder.beginPortal()
    ["frameBlock(net.minecraft.resources.ResourceLocation)"](new ResourceLocation("minecraft", "slime_block"))
    .destDimID(new ResourceLocation("nostalgic", "toxic_cave"))
    .lightWithItem(new ResourceLocation("naturesaura", "token_terror"))
    .tintColor(90, 255, 90)
    .registerPortal();

});
