Phase 10: implement neoforge-26_1 leaf (WS, deltas, chat, link, reconciliation, player tracking)

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()).
This commit is contained in:
2026-08-09 22:44:06 +02:00
parent 0d8e670cd8
commit 52417a7b92
13 changed files with 918 additions and 31 deletions
+21 -5
View File
@@ -1,12 +1,28 @@
// Loader assumed to be NeoForge (see root plan's Open Assumptions — confirm the actual 26.1.x
// loader ecosystem before Phase 10). Uses the modern ModDevGradle plugin; requires a recent JDK
// (21+) unlike the two legacy leaves.
// 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.+'
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_21
group = 'com.octoturge.mcmapper'
version = '0.1.0-SNAPSHOT'
repositories {
mavenCentral()
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(25)
}
}
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_25
sourceSets {
main {
@@ -17,7 +33,7 @@ sourceSets {
}
neoForge {
version = project.neoforge_26_1_version
version = '26.1.2.94'
runs {
client {}