Files
cobblemon-survival-pack/mod/build.gradle.kts
T
claudeandClaude Opus 5.5 72965caedf Phase 8: the pack's own JEI pages for every drop source
Adrian, 2026-11-02/03: every item that can drop gets a JEI page naming its
sources, alongside the Cobblemon Info add-on (which shows drops and biomes,
not zones). The companion mod's JEI plugin (jei/DropSourcesJei.kt) adds:
- Pokemon drops on the island: 794 species of lines that live on the
  island, with chances, amounts and the zones they spawn in (or where their
  line lives); spawns with their own drops (Beheeyem in the End). The Drop
  Synthesizer core is the catalyst.
- Guardians and the End boss; Sacrifice Altar tiers and specials; Rebirth
  Chamber; zone ore veins with regrow times; Cobblebase pasture finds per
  skill and zone.

JEI runs on the client, so the pages read assets/cobblesurvival/jei/
drop_sources.json inside the mod, written by tools/jei_sources.py from the
pack's files. Self-tests drop_sources_match_the_server (file vs live server:
drops, zones, own-drop spawns, guardians, End boss, altar) and
jei_pages_build (every page builds, every item exists). The ore a vein gives
moved into world/zones.json (ores -> item), shared with the quest book.
JEI's API (19.64.0.455) is a compile-only dependency from JEI's own Maven.
Self-tests and the island check pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 11:58:18 +01:00

87 lines
2.7 KiB
Kotlin

plugins {
id("java")
id("dev.architectury.loom") version ("1.11-SNAPSHOT")
id("architectury-plugin") version ("3.4-SNAPSHOT")
// Must read the stdlib that Kotlin for Forge ships (5.12.0 -> Kotlin 2.4.0).
kotlin("jvm") version ("2.4.0")
}
val modId = property("mod_id") as String
val modVersion = property("mod_version") as String
val minecraftVersion = property("minecraft_version") as String
val neoforgeVersion = property("neoforge_version") as String
val cobblemonVersion = property("cobblemon_version") as String
val kotlinforforgeVersion = property("kotlinforforge_version") as String
val jeiVersion = property("jei_version") as String
group = "dev.cobblesurvival"
version = modVersion
base.archivesName = modId
architectury {
platformSetupLoomIde()
neoForge()
}
loom {
silentMojangMappingsLicense()
}
repositories {
mavenCentral()
maven("https://maven.neoforged.net/releases/")
maven("https://thedarkcolour.github.io/KotlinForForge/")
// Cobblemon's coordinates come from its official MDK, not guessed.
maven("https://artefacts.cobblemon.com/releases/")
// JEI's own Maven, as its README gives it (Phase 8: the pack's drop sources as JEI pages).
maven("https://maven.blamejared.com/")
}
dependencies {
minecraft("net.minecraft:minecraft:$minecraftVersion")
mappings(loom.officialMojangMappings())
neoForge("net.neoforged:neoforge:$neoforgeVersion")
modCompileOnly("com.cobblemon:mod:$cobblemonVersion") { isTransitive = false }
modImplementation("com.cobblemon:neoforge:$cobblemonVersion")
modCompileOnly("mezz.jei:jei-$minecraftVersion-neoforge-api:$jeiVersion")
implementation("thedarkcolour:kotlinforforge-neoforge:$kotlinforforgeVersion") {
exclude("net.neoforged.fancymodloader", "loader")
}
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.10.0")
}
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
}
kotlin {
jvmToolchain(21)
}
tasks {
test {
useJUnitPlatform()
}
processResources {
val props = mapOf(
"mod_id" to modId,
"version" to modVersion,
"neoforge_version" to neoforgeVersion,
"cobblemon_version" to cobblemonVersion.substringBefore('+'),
"kotlinforforge_version" to kotlinforforgeVersion,
)
inputs.properties(props)
filesMatching("META-INF/neoforge.mods.toml") {
expand(props)
}
// datapacks/core ships inside the mod as an always-enabled built-in pack.
from(rootDir.resolve("../datapacks/core")) {
into("datapacks/core")
}
}
}