plugins {
    id "com.github.johnrengelman.shadow" version "7.0.0"
    id "com.matthewprenger.cursegradle"
}

loom {
    accessWidenerPath = project(":common").loom.accessWidenerPath

    mods {
        forge {
            sourceSet project(":neoforge").sourceSets.main
        }
    }
}

architectury {
    platformSetupLoomIde()
    neoForge {
        platformPackage = "forge"
        remapForgeLike "net/minecraftforge/common/extensions/IForgeItem", "net/neoforged/neoforge/common/extensions/IItemExtension"
        remapForgeLike "net/minecraftforge/client/event/TextureStitchEvent\$Post", "net/neoforged/neoforge/client/event/TextureAtlasStitchedEvent"
        remapForgeLike "net/minecraftforge/fluids/ForgeFlowingFluid", "net/neoforged/neoforge/fluids/BaseFlowingFluid"
        remapForgeLike "net/minecraftforge/fluids/ForgeFlowingFluid\$Properties", "net/neoforged/neoforge/fluids/BaseFlowingFluid\$Properties"
        remapForgeLike "net/minecraftforge/common/ForgeHooks", "net/neoforged/neoforge/common/CommonHooks"
    }
}

configurations {
    common
    forgeLike
    compileClasspath.extendsFrom common, forgeLike
    runtimeClasspath.extendsFrom common, forgeLike
    developmentNeoForge.extendsFrom common
    developmentForgeLike.extendsFrom forgeLike
}

dependencies {
    neoForge "net.neoforged:neoforge:${rootProject.neoforge_version}"

    implementation(project(path: ":neoforge", configuration: "namedElements")) { transitive false }
    common(project(path: ":common", configuration: "namedElements")) { transitive false }
    common(project(path: ":testmod-common", configuration: "namedElements")) { transitive false }
    forgeLike(project(path: ":forge", configuration: "namedElements")) { transitive false }
}
