52417a7b92
Ports the full feature set proven by the two legacy leaves to modern, post-Flattening NeoForge (loader assumption confirmed: NeoForge 26.1.2.94 is real and published). Neoforge261ChunkAdapter reads BlockState via LevelChunk/LevelChunkSection instead of raw id+meta, carrying the full packed state id in DeltaEvent#blockStateId (a lossless int, unlike the pre-Flattening 16-bit encoding) while documenting a known truncation caveat for SectionData's char[]-based 3D backfill on very large modded registries. MCMapperMod uses constructor-injected event buses (IEventBus/ModContainer) and NeoForge.EVENT_BUS instead of @Mod.EventHandler methods, ModConfigSpec instead of legacy Configuration, and LinkCommand is a Brigadier registration (no CommandBase in this era) fired from RegisterCommandsEvent. Tracks its own loaded-chunk set via ChunkEvent.Load/Unload rather than querying chunk provider internals (no stable public API for that in modern MC). Gets its own standalone Gradle wrapper + settings.gradle (Foojay toolchain resolver) since ModDevGradle needs Gradle 8+ and a Java 25 toolchain (MC itself now requires Java 25), incompatible with the legacy leaves' Gradle-7/JDK-8 pin in one invocation. Verified against real NeoForge 26.1.2.94 + decompiled MC 26.1.2 source via ./gradlew build from inside neoforge-26_1/ (two real API mismatches caught and fixed by the compiler: ChunkPos is now a record — x()/z() methods, not fields — and ResourceLocation was renamed to Identifier, ResourceKey#identifier() not #location()).
49 lines
1.0 KiB
Groovy
49 lines
1.0 KiB
Groovy
// Loader confirmed NeoForge (Phase 10) — versions like 26.1.2.94 are published on
|
|
// maven.neoforged.net. Uses the modern ModDevGradle plugin. Minecraft itself now requires Java
|
|
// 25 (bumped from 21 during the 26.x cycle) — see settings.gradle's comment on how the Java 25
|
|
// toolchain gets provisioned without needing it pre-installed system-wide.
|
|
//
|
|
// Standalone build, not part of the root multi-project build — see settings.gradle.
|
|
|
|
plugins {
|
|
id 'net.neoforged.moddev' version '2.0.+'
|
|
}
|
|
|
|
group = 'com.octoturge.mcmapper'
|
|
version = '0.1.0-SNAPSHOT'
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion = JavaLanguageVersion.of(25)
|
|
}
|
|
}
|
|
|
|
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_25
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
srcDir '../common/src/main/java'
|
|
}
|
|
}
|
|
}
|
|
|
|
neoForge {
|
|
version = '26.1.2.94'
|
|
|
|
runs {
|
|
client {}
|
|
server {}
|
|
}
|
|
|
|
mods {
|
|
mcmapper {
|
|
sourceSet sourceSets.main
|
|
}
|
|
}
|
|
}
|