feat(neoforge): Add NeoForge 1.21.1 support#4255
Open
Cobbert wants to merge 3 commits intowebbukkit:neoforgefrom
Open
feat(neoforge): Add NeoForge 1.21.1 support#4255Cobbert wants to merge 3 commits intowebbukkit:neoforgefrom
Cobbert wants to merge 3 commits intowebbukkit:neoforgefrom
Conversation
added 3 commits
March 7, 2026 12:40
Adds support for NeoForge 1.21.1 (Minecraft 1.21.1). Changes from neoforge-1.20.6: - Package rename: neoforge_1_20_6 → neoforge_1_21_1 - Imports: net.minecraftforge.* → net.neoforged.* - API: MinecraftForge.EVENT_BUS → NeoForge.EVENT_BUS - API: isSolidRender()/propagatesSkylightDown() → canOcclude()/isAir() - API: isSolid() → canOcclude() - API: getStatus() → getPersistedStatus() - API: getLastAvailable() → getLatestChunk() - API: ServerTickEvent phase check removed (NeoForge 21.x uses subclasses) - NBT API: Updated for 1.21.1 method changes Build config: - neoforge.mods.toml: loaderVersion [4,), versionRange [21.1,) - build.gradle: neoforge 21.1.219, userdev 7.1.20 Note: This module requires Gradle 8.8+ due to NeoForge Gradle userdev requirements. The monorepo may need a Gradle wrapper upgrade. Tested on ATM10 5.5 with 445 mods (standalone build).
- Upgrade Gradle wrapper: 8.7 -> 8.14
- Upgrade fabric-loom: 1.6.11 -> 1.8.13 (all 10 fabric modules)
- Add neoforge-1.21.1 module with working source code:
- DynmapMod.java, DynmapPlugin.java, ForgeMapChunkCache.java, NBT.java
- accesstransformer.cfg: exposes serverLevelData, visibleChunkMap fields
- neoforge.mods.toml: mod metadata
- Fix neoforge-1.21.1/build.gradle: add minecraft { accessTransformers {} } block
- Build requires --configure-on-demand to avoid IdeaExtPlugin conflict
between multiple NeoForge subproject versions
Verified builds:
:neoforge-1.21.1:shadowJar -> target/Dynmap-3.7-SNAPSHOT-neoforge-1.21.1.jar
:fabric-1.20.6:build -> SUCCESS
…tributing guidelines
Author
|
This is running on my atm10 server, no issues yet, please advised if there are issues, I can go back and verify anything needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(neoforge): Add NeoForge 1.21.1 support
What this adds
Adds a new
neoforge-1.21.1module for NeoForge support on Minecraft 1.21.1. This is a direct port of theneoforge-1.20.6module with only the API changes required by NeoForge 21.1.x and Minecraft 1.21.1.Changes from neoforge-1.20.6
Package/Import Changes
neoforge_1_20_6→neoforge_1_21_1net.minecraftforge.*→net.neoforged.*net.minecraftforge.eventbus.api.*→net.neoforged.neoforge.eventbus.api.*API Changes (Required by NeoForge 21.x / MC 1.21.1)
isSolidRender(EmptyBlockGetter.INSTANCE, BlockPos.ZERO)canOcclude()propagatesSkylightDown(...)isAir()isSolid()canOcclude()MinecraftForge.EVENT_BUSNeoForge.EVENT_BUSgetStatus()getPersistedStatus()getLastAvailable()getLatestChunk()getAllKeys()keySet()contains(s, i)contains(String, int)behavior changedgetByte(s)etc.getByteOr(s, default)etc.getCompound(s)/getList(s,i)getCompoundOrEmpty(s)/getListOrEmpty(s)obj.get(s).getAsString()asString().orElse("")Build Configuration Changes
build.gradle:net.neoforged.gradle.userdevversion:7.0.133→7.1.20net.neoforged:neoforge:20.6.62-beta→21.1.219neoforge.mods.toml:loaderVersion:[2,)→[4,)versionRange:[20.6,)→[21.1,)versionRange:[1.20.6,1.21)→[1.21.1,1.22)Java 21 Requirement
NeoForge 1.21.1 requires Java 21 — this is a platform requirement, not a code choice. The module is configured for Java 21 toolchain.
Gradle/Build System Changes
Gradle Wrapper: Updated from 8.7 to 8.14.
This is required because NeoForge Gradle userdev 7.1.20 (needed for NeoForge 21.1.x) requires Gradle 8.8+. The dependency chain:
fabric-loom: Updated from 1.6.11 to 1.8.13 in all 10 fabric modules.
fabric-loom 1.6.11 is not compatible with Gradle 8.14. This is a transitive requirement — without updating loom, the existing fabric modules would fail to build after the Gradle upgrade. Verified that fabric-1.20.6 still builds successfully with loom 1.8.13.
Note:
--configure-on-demandflag is recommended when building to avoid plugin conflicts between multiple NeoForge subproject versions.Test Results
Tested on ATM10 5.5 modpack (445 mods):
Code Style Note
This port aims to be strictly minimal. The one structural change beyond API requirements is the event registration pattern — NeoForge 21.x uses
addListener()instead of registering annotated inner classes, which required restructuringChatHandlerfrom an inner class to a direct method. All other changes are API-forced.AI Assistance Disclosure
This port was developed with AI assistance (Claude, acting as an agent on behalf of the contributor) to deploy a working version for an ATM10 NeoForge server. All changes were reviewed, tested, and verified by the contributor before submission.
Branch:
neoforge-1.21.1-prBase:
neoforgeFork: https://github.com/Cobbert/dynmap