Build: every tool pinned (JDK, packwiz, Gradle plugins, Python packages), exports normalised, tools/check_reproducible.py proves two clean builds are byte-identical. Server-side balance: a server can load config/cobblesurvival/datapack.zip in place of the jar's data, /reload applies it, tools/server_update.py packages it and refuses when a client change is needed. JEI drop pages are sent by the server. Code-held balance numbers moved to tuning/server.json. Performance: spark in the pack (server only), tools/perf_test.py with fake players whose chunks really are active, docs/performance.md. Adrian's feedback: default keys R, U, J, §; drop pages link to Cobblemon Info and show real chances; bosses only hurt in battles; battle XP halved; channels between the islands low level; temperature ×3 with insulation doubled; hazards start at once; no item dots on the map; a wild attack starts a battle; the starter only faints; quest book on join with a basics page and an HMs page; regional forms obtainable. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
93 lines
2.9 KiB
Kotlin
93 lines
2.9 KiB
Kotlin
plugins {
|
|
id("java")
|
|
id("dev.architectury.loom") version ("1.11.458")
|
|
id("architectury-plugin") version ("3.4.164")
|
|
// 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 {
|
|
// Same sources, same bytes (tools/check_reproducible.py).
|
|
withType<AbstractArchiveTask>().configureEach {
|
|
isPreserveFileTimestamps = false
|
|
isReproducibleFileOrder = true
|
|
}
|
|
|
|
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")
|
|
}
|
|
}
|
|
}
|